According to an affidavit filed in Rockland District Court, Ryan S. Withee of Purchase Street admitted that he sexually assaulted the child.

A bail commissioner initially set bail at $100,000 cash for Withee. In court on Monday, Judge Susan Sparaco lowered bail to $10,000 cash.

Withee did not enter a plea at his initial appearance in court to the charge of gross sexual assault.

The affidavit filed by Detective Sgt. Christopher Young of the Rockland Police Department stated that the mother of the 3-year-old girl found the child in Withee’s bed and that the child said he had hurt her.

The child was taken to Pen Bay Medical Center in Rockport and evaluated for injuries. The child was not seriously injured, Young said.

Rockland police Officer William Smith interviewed Withee, who admitted to the assault, according to the affidavit.

Assistant District Attorney Chris Fernald had sought $50,000 bail at Monday’s hearing, citing the severity of the charge and a history of criminal offenses that include criminal mischief, theft, disorderly conduct and possession of drug paraphernalia.

The gross sexual assault charge carries a potential sentence of 30 years in prison.

Withee was charged in 2005 for gross sexual assault and unlawful sexual contact against a girl younger than 12 years old. He was acquitted during a trial in 2005.