In a negotiated plea agreement, a Spring Grove man, who texted a picture of his penis to the 15-year-old friend of his daughter, pleaded guilty in York County court to displaying obscene or sexual materials, according to court documents.

Judge Michael E. Bortner sentenced Ryan J. Barnes, 35, of the 400 block of North Pine Avenue, to four to 23 months in county prison and a consecutive two years probation for the first-degree misdemeanor.

He ordered Barnes to comply with sex offender probation conditions with the exception that he may have contact with his own children under supervision.

According to a Southwestern Regional Police affidavit, the girl was 15 years old when Barnes began sending text messages and calling her in 2012.

Police said the texts "began to include sexual content, referring to having sex" with the minor. Barnes sent the girl a picture showing the lower portion of his face, his "partially nude body (and) exposing his penis," police said.

The girl told police that one time when she was spending the night with Barnes' daughter, she woke up to Barnes rubbing her back under her clothing. She said she declined his invitation to go into his bedroom.

The girl's grandmother contacted police when she learned of the texts, the complaint states.

Police said Barnes sent the girl 397 text messages and made 87 phone calls between Jan. 9 and May 28, 2012.

Barnes

declined to take a polygraph test, police said.

Neither Barnes nor his attorney, Cory Miller, could be reached for comment. Barnes is to report to York County Prison on Oct. 14.