police at the scene
A 27-year-old Nebraska teacher avoided a felony charge by having sex with a boy on his 16th birthday iStock

A Nebraska teacher charged with having birthday sex with a 16-year-old did it because she has a mental illness, her lawyer claimed in court. The 27-year-old middle school teacher allegedly led a "double life" that included sleeping with the boy last year.

Emily Lofing was sentenced on Monday (17 July) to 90 days in jail, two years of probation and 240 hours of community service, New York Post reported. She was also fined $1,000.

Judge John Steinheider described her behaviour as predatory, KWBE reported. "You send kids to school, to day care, to Bible school...and you expect them to be treated with respect and in safe places and you took that away from at least the victim in this instance,"he said.

Attorney Desirae Solomon claimed Lofing's predatory behaviour was caused by her family history of depression and work stress.

"That's the tragedy of mental illness," Solomon told the judge. "It doesn't know demographics. It doesn't know race. It doesn't know age. It doesn't know education, and, when mental illness strikes, it can sometimes do so without any warning."

The lawyer also pointed to letters of support as evidence that Lofing's crime was uncharacteristic. "They speak to a period of time when Ms Lofing was living a double life," she said. "People who have known her for her whole entire life were shocked at this type of behaviour."

According to WOWT, the judge noted that Lofing managed to avoid more serious charges.

"This alleged indiscretion, I'll say, took place on the victim's 16th birthday," Steinheider said. "You were less than 24 hours from a felony here."

The age of consent in Nebraska is 16. Loving pleaded no contest to a misdemeanour debauching a minor charge. The former teacher at Nebraska City Middle School in Weeping Water willingly surrender her teaching license.

Steinheider said Lofing could be released from jail as soon as 53 days for good behaviour.