A former Florida middle school teacher today was sentenced to three years in prison for having sex with her 14-year-old student and sending him nude photos of herself.

Stephanie Peterson, 27, learned her fate after pleading guilty in October to one felony count of lewd or lascivious battery sex act with a child and one felony count of transmission of harmful material to minors by electronic means.

Seventh Judicial Circuit Court Judge Paul Zambrano delivered the sentence after Peterson's defense successfully argued for a downward departure from the minimum sentence of five years the prosecution had requested. Peterson earlier faced the prospect of spending up to 10 years in prison.

Scroll down for video

Case closed: Stephanie Peterson, 27, a former Florida middle school teacher, today was sentenced to three years in prison for having sex with her 14-year-old student

Peterson is pictured in a white sweatshirt standing between her two defense lawyer and listening to Judge Paul Zambrano at her sentencing Wednesday

Peterson was led of the courtroom in handcuffs. She was sentenced to 36 months for a felony count of battery sex act

Peterson was sentenced to 36 months for the battery sex act and to time served for transmission of harmful material, followed by two years of house arrest and five years of sex offender probation, reported WKMG.

She must avoid contact with all minors, but the judge made an exception for her brother's two children.

The verdict came after the court heard emotional victim impact statements from the boy's family, and testimony from Peterson's mother, brother and step-father who all pointed a finger of blame for what happened at her recently diagnosed bipolar disorder and begged for leniency.

The former New Smyrna Beach Middle School science teacher was arrested in February after the 14-year-old told his parents about their relationship.

He confessed to his parents that Peterson would pick him up from their home at 11pm and that they often spent hours together at her home while her firefighter husband was at work.

Peterson's family said that around the time she was diagnosed with a bipolar disorder at age 25, the young teacher started dressing provocatively and using a lot of makeup

The defense argued that Peterson turned to alcohol, marijuana and cocaine as part of an effort to self-medicate herself

The teen claimed he had sex with Peterson in her house and car as well as a barn behind his own house from November 2017 to January 2018.

Two dozen relatives and friends filled the courtroom to support Peterson.

Her mother, elementary school teacher Johnna Peterson, took the stand in her daughter’s defense, describing her as a caring person who excelled academically both in high school and college, and who always went out of the way to help others.

‘She puts everybody first,’ Mrs Peterson said.

According to Mrs Peterson, her daughter and son's biological father was abusive, and later on he severed all ties with his children.

Peterson had been struggling with depression from an early age, and then at 25 she was diagnosed with a bipolar disorder, which dramatically altered her behavior.

The mother said that from the time of her arrest, Peterson has been receiving mental health treatment and taking part in a support group for people suffering from a bipolar disorder.

Peterson’s adoptive father, attorney Phil Peterson, and her older brother, Justin, both appeared as character witnesses, telling the court about her fraught mental health history and her profound remorse for her actions.

The court also heard from the victim’s grandmother, who accused Peterson of taking advantage of her only grandchild at a time when he was most vulnerable because of his mother’s illness.

The child’s mother also delivered a victim impact statement, speaking through sobs about the heart-wrenching effects of her son’s relationship with his teacher on his life.

‘I don’t think I will ever be able to put into words the devastation and sadness he has gone through,’ the boy’s parent said. ‘He is no longer the vibrant, funny, light-hearted child. He is now untrustworthy of new people, and even old friends.’

The woman tearfully talked about her son’s bouts of uncontrollable rage and crying, which has required counselling.

The boy also has been struggling with making new friends in high school, where the mother said he has been subjected to cruel taunts from bullies who labelled him a ‘teacher f***er.’

Peterson's mother, Johnna, appeared as a character witness, talking about her daughter's impressive academic record and her struggles with mental illness

Peterson's step-father, attorney Phil Peterson (right), also spoke out in her defense

Peterson has been taking medications for her bipolar disorder, attending AA and support group meetings

‘My child is gone,’ the mother said through tears.

When given a chance to speak in her own defense, Peterson rattled off a prepared statement, showing little emotion during the reading, except when talking about her failed suicide attempts, including inside a police car.

‘Every day I wish I could scream, “I'm sorry,”’ she said. ‘There are not enough words to describe the amount of remorse I feel for what had taken place.’

She added: ‘sorry doesn't even begin to sum up my emotions. I will continue to be sorry until the day I die.’

Peterson's defense argued during Wednesday's hearing that at the time of her trysts with the underage victim, she was in a manic state and self-medicating her mental health condition with alcohol, marijuana and cocaine after being prescribed the wrong drug.

The former teacher's lawyer, Aaron Delgado, appealed to the judge to consider sentencing his client to probation and community service instead of prison time, citing mitigating circumstances in Peterson's life related to her medical history and her spotless record.

The prosecution countered by arguing that Peterson should have known better than to have sex with a 14-year-old boy and take illegal narcotics.

'She knew what she was doing. She knew what she was doing is wrong,' the prosecutor stated, asking the judge not to depart from the sentencing guidelines.

'Stephanie Peterson is not a victim. Stephanie Peterson is here because of her actions, and actions have consequences,' the prosecutor added.

Before delivering the sentence, Judge Zambrano addressed Peterson directly, saying that she did nothing to help her mental illness by turning to alcohol and drugs, and then crossing the line by pursuing a sexual relationship with a child.

'You're actions have life-long consequences to you and to this child for the rest of his life,' he said. 'That memory will never be taken from him.'