An 11th grade English teacher resigned last week after she was accused of having sexual relations with a student at a Pennsylvania high school.

Emily Nesbit, 31, was charged with institutional sex assault, a third-degree felony, on Friday. Police said Nesbit admitted meeting an 18-year-old male student for sex in a classroom after hours at Cumberland Valley High School in Mechanicsburg.

Nesbit is charged based on her position as a teacher, without regard to the age of the student. If convicted she could face up to seven years in prison, prosecutors told ABC 27 News.

Administrators learned about the alleged inappropriate contact on March 10 after a female student discovered sexual text messages on the alleged victim's phone, according to Fox 43 News. These included partially clothed and naked photos of Nesbit and the student.

According to the Patriot News, Silver Spring Township police interviewed the alleged victim the next day. They learned he and the teacher had been in communication for about two months and met several times in the classroom after school. The student did not deny his relationship with the teacher. Police said the teacher's phone number was listed as "My Lady Friend" in the student's iPhone.

Prosecutors are urging parents to closely monitor their children's phones and social media accounts in the wake of the scandal.

"The message to parents is, you need to 100 percent read your child's text messages, follow them on Instagram, follow them on Twitter," prosecutor David Freed said, according to ABC 27 News.

Nesbit's attorney released a statement Friday, explaining that the teacher "made a series of bad decisions at a low point in her life," and that she "intends to accept responsibility in court and continue to work on her personal issues that lead to the alleged inappropriate conduct," PennLive reports.

Fox 43 News reports that the recent events caused unease and mistrust among faculty and students alike. Cumberland Valley superintendent Frederick Withum said that teachers felt "betrayed" by the alleged conduct.