A former high school teacher who cited her brain surgery as the reason she sexually assaulted six male students has pleaded guilty.

Nicole Dufault pleaded guilty to multiple counts of criminal sexual contact in a plea deal just as her trial was set to start, authorities said last week. The plea deal includes a recommended five-year state prison sentence, along with the forfeiture of her teaching license. 

Dufault will also have to register as a sex offender and will be subject to parole supervision for life.

"We believe this is an appropriate resolution," said Assistant Prosecutor Eric Plant in a statement. "We hope that it will deter other individuals entrusted with the welfare of children from engaging in similar acts and ensures the public's safety by requiring Ms. Dufault to register as a sex offender and forfeit her employment as a teacher in this state."

Dufault was arrested in 2014 on charges she sexually assaulted students at Columbia High School in Maplewood. She had been teaching language arts for nine years. According to several reports, Dufault's victims were between 14 and 15 years old when authorities say she engaged in sexual activity with them on multiple occasions between 2013 and 2014.

Dufault's attorney, Timothy Smith, had argued Dufault was the victim due to brain surgery that left her vulnerable to the students. 

NJ.com reports that Smith previously said his client suffered from "frontal lobe syndrome," which some experts have said is associated with the inability to control impulses.

She is scheduled to be sentenced on Jun. 8.