A former school librarian accused of sexual conduct with a 14-year-old student faces up to three years in prison after pleading guilty to an official misconduct charge.

Kimberly Pinkham, 38, of Mullica Hill, was employed as a library/media specialist at Kingsway Regional School District in Woolwich Township, and worked in the middle school.

Prosecutors accused her of forming an “inappropriate instructor/student relationship where she engaged in inappropriate sexual conduct with the student both during school hours and after.”

Pinkham was suspended in February, charged in May and has since resigned from her post with the school.

In one incident, Pinkham and the student were allegedly caught in the school media room with the lights off. They were found laying on the media room floor and looking at each other, Assistant Prosecutor Elizabeth Tornese said during a September hearing. They were also spending a lot of time together outside of school, Tornese noted.

She had photos of the student on her desk and referred to him as her “hot boyfriend” in text messages, prosecutors alleged.

Investigation of text messages between the librarian and student indicated “an inappropriate, possibly sexual relationship,” Tornese said, adding that prosecutors didn’t have evidence of a sexual assault.

Prosecutors had previously offered Pinkham a sentence of five years in prison in return for a guilty plea, but she rejected that offer and the case went to a grand jury, which indicted her in September on a second-degree charge of official misconduct and third-degree charge of endangering/sexual conduct with a child.

Under terms of a plea agreement she signed Dec. 9, Pinkham pleaded to the official misconduct charge, which carries a potential 10-year prison term.

Prosecutors have agreed to recommend a three-year sentence with a requirement that she serve at least two years before she is eligible for parole. She also forfeits her teaching certificate under the deal.

Sentencing is scheduled for Jan. 24.

Matt Gray may be reached at mgray@njadvancemedia.com. Follow him on Twitter @MattGraySJT. Find NJ.com on Facebook.

Have a tip? Tell us: nj.com/tips. Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.