By Ray Sanchez, David Shortell and Emanuella Grinberg CNN
(CNN) -- A man who was with Rosie O'Donnell's missing daughter Chelsea this week has been arrested on charges of distribution of obscenity to a minor and endangering the welfare of a child, authorities said.
Steven Sheerer, 25, a resident of Barnegat, New Jersey, was picked up Friday after investigators examined the 17-year-old girl's cell phone, according to statement from Ocean County Prosecutor Joseph Coronato.
On the phone, police found evidence of "inappropriate communications over the last several weeks between Sheerer and the minor," the statement said.
The comedian tweeted on Tuesday evening that her daughter had been found and was with police. "Thank u all for the help and light," she wrote.
The prosecutor's statement did not identify the minor but Barnegat police said Chelsea O'Donnell was found in Sheerer's home.
A computer and other digital equipment were seized as part of the investigation, according to the statement.
Sheerer is being held in the Ocean County Jail, with bail set at $40,000, the statement said. A judge ordered that he have no contact with the girl or her family. It's unclear whether he has an attorney.
Each third-degree count against Sheerer carries a possible penalty of five years in prison.
Cindi Berger, a spokeswoman for Rosie O'Donnell, said earlier this week that Chelsea ran away from home and was last seen by her family on August 11.
On Tuesday evening, the Rockland County Sheriff's Department in New York requested that a Barnegat police officer check on single-family houses in the small town located about 70 miles south of New York City, Barnegat police Lt. Keith German said. It's unclear how the connection to Barnegat was made.
At the third house he checked, the officer found a 25-year-old man who he recognized and believed was being evasive, according to Germain.
The man eventually admitted that Chelsea O'Donnell was inside the house.
The officer found Chelsea, who said she had gone to the house voluntarily, the Barnegat police lieutenant told CNN.
That night, the comedian sent thanks to the police departments that helped find her daughter.
The 17-year-old left home with her 6-month-old therapy dog, a black terrier named Bear, O'Donnell said in a statement on her website. Chelsea had stopped taking medication for an undisclosed mental illness and "is in need of medical attention," the statement said.
"Chelsea, like millions of people, lives with mental illness," Berger said while the teenager was still missing.
O'Donnell also shared the information from her social media accounts with pictures of her daughter with her dog.
The family contacted South Nyack Police in upstate New York last Sunday to report that Chelsea had not returned home, Sgt. Daniel Wilson said. The family had not seen her since August 11, but they had been in contact with her, Wilson said. Berger denied that the family had been in contact with Chelsea since they'd seen her.
CNN's Sarah Jorgensen, Alexandra Field, Greg Botelho and Carolyn Sung contributed to this report.
TM & © 2015 Cable News Network, Inc., a Time Warner Company. All rights reserved.