A married high school teacher in Maine pleaded not guilty Monday to sex charges after she was accused of sleeping with a 17-year-old student.

Jill Lamontagne, 29, of Kennebunk, pleaded not guilty to 14 charges, including six counts of gross sexual assault, two counts of unlawful sexual contact and six counts of sexual abuse of a minor, according to The Portland Press Herald.

Lamontagne was indicted in October and turned herself into authorities. The teacher allegedly had a relationship with a male student who was in her health class at Kennebunk High School at the time of their sexual contact.

MARRIED MAINE TEACHER INDICTED FOR MULTIPLE SEX ROMPS WITH STUDENT WHO TRIED TO COMMIT SUICIDE

“Mrs. Lamontagne categorically denies the charges,” Lamontagne’s lawyer, Scott Gardner, said following the indictment, Seacoast Online reported. “These allegations arise from a high school rumor which consisted of the fantasies of an emotionally troubled senior at Kennebunk High School. None of this is true.”

The alleged relationship between Lamontagne and the student was revealed when the student was hospitalized following a suspected suicide attempt.

The student reportedly ingested a concoction of ibuprofen, Tylenol, cold medicine and blood thinner Warfarin.

The boy confessed to the relationship to his aunt a day after his hospitalization. The student and his teacher had sexual contact “numerous times, in the classroom, at her house, in her car,” the student’s mother wrote. The student said Lamontagne performed oral sex on him, adding that “other stuff happened.”

The student reportedly told his mother and a nurse at the hospital that he loved Lamontagne and took the mixture of medicines to attempt suicide.

The teacher was placed on administrative leave in June and later resigned in September.

PREP SCHOOL TEACHER, 28, HAD 'SEX IN THE PARK' WITH 16-YEAR-OLD BOY STUDENT, POLICE SAY

According to the Press Herald, it’s a class-C felony under state law for teachers or adults to have sexual contact with someone they have supervisory authority over.

Class-C crimes reportedly carry a maximum prison sentence of five years and/or a $5,000 fine.

Lamontagne is scheduled to appear in court on March 8 for a dispositional conference.