MORRISTOWN, Pa. – A former Pennsylvania high school English teacher was sentenced to five years in prison for sexting with a 16-year-old student, who she attempted to paint as the aggressor.

Former Parsippany Hills High School teacher and field hockey coach Jenna Leahey pleaded guilty in January to endangering the welfare of a child in a pleas agreement that allowed the 35-year-old to escape a more serious charge of official misconduct, the Daily Record reports.

MORE NEWS: Know These Before Moving From Cyprus To The UK

Leahey repeatedly rejected plea offers from prosecutors last year and initially alleged her sexually explicit conversations with a junior at the school between February and June 2013 were instigated by the student.

But a selection of the thousands of text messages exchanged between the two – read out loud in court by Morris County Assistant Prosecutor Meg Rodriguez – told a much different story.

“I’m horny all the time,” “It’s wrong; I still want it though,” “You are one lucky kid,” and “God, I want u, I know I shouldn’t” and others far more explicit showed the relationship went both ways.

The student, now 20-years-old with a pending lawsuit against Leahey and the Parsippany school district, was a student in Leahey’s class the year before the relationship became sexually charged. The situation unraveled when the teen showed a friend an explicit picture he received from Leahey, according to the Daily Record.

The friend testified at a pre-trial hearing that the alleged victim told him the two touched each others genitals in Leahey’s classroom, according to the Daily Mail.

Leahey was set to be sentenced March 2 by Superior Court Judge Salem Ahto, but it was delayed until Monday for unknown reasons, NJ.com reports.

MORE NEWS: How to prepare for face-to-face classes

At the sentencing hearing, Ahto noted that Leahey did text the student to “wait a couple of years, wait until you’re 18,” but “then you didn’t pay any attention to your own statement.”

Both Leahey’s family and the victim and his family attended the former teacher’s sentencing and offered statements to the court.

“I am guilty of texting my student. At the time I did it I thought it would help to end the ongoing sexual assault. Now I realize there were and are far better ways to have dealt with the situation. I’m deeply ashamed and embarrassed for what I’ve done. Please know there was no malice in my actions,” Leahey said.

“If I could change how I reacted to the situation I would. Now all I can do is try to repair the damage that was done. All my life I’ve wanted to be helpful,” she said.

Leahey said she regretted not informing school officials about the situation, and is “terrified of my safety in prison.”

Rodriguez told the court “the reason she handled it on her won is because she was knee-deep in these sexual conversations with him.”

“Was he persistent? Was he annoying? Yeah. But he was 16,” she said.

The assistant prosecutor also read a letter from the teen and his parents that alleged the victim is “mortified” by the sexting but Leahey encouraged him to write her dirty notes.

“We feel you could have done the right thing and admitted your guilt over the last four years,” Rodriguez read from the victim’s statement. “Instead, you chose to be a coward, making excuse after excuse, lie after lie, just to prolong the case against you.”

“This experience brought a lot of stress into my life – before, during and especially after it happened. This whole experience was confusing because of her role as a teacher and her age,” the letter read.

Ahto ultimately sentenced Leahey to five years in prison, and she will be eligible for parole after about 13 months. Rodriguez told the Daily Record Leahey will likely serve one-third to half of her full sentence.

The former teacher already surrendered her teaching certificate, and will be required to register as a sex offender with parole supervision for life.