A Philadelphia special education teacher and mother of a 7-month-old son told the court she sexually abused a 14-year-old student because she was hooked on heroin.

Ethan Allen Elementary School teacher Stephanie Amato, 33, received an 11 ½- to 23-month prison sentence Tuesday after pleading guilty to sexual relations with a 14-year-old student over several months – at her parent’s home, in her car and at a park, Philly.com reports.

Defense Attorney Trevan Borum argued that Amato deserved probation rather than prison time because the crime was her first, and she was addicted to heroin at the time.

Borum said Amato started “recreational use” of narcotics in 2010, and was snorting heroin daily by the time of her arrest in June 2014. Borum said Amato repeatedly tried and failed to kick the habit with inpatient drug treatment, but is now sober and taking care of her young son.

The attorney claimed a psychiatrist who evaluated the teacher and concluded “she is a low risk for reoffending, and her risk will likely only decrease over time,” according to the news site.

“I truly feel that I do not believe this would have occurred if it were not for the drugs,” Amato told the court in a tearful apology to her teen victim.

Prosecutors claim Amato targeted her victim because of his poor economic background and family life, and engaged in repeated oral and vaginal sex, and kept in close contact with the boy during the investigation, telling him “You know I can get arrested if you tell,” Philly.com reports.

Assistant District Attorney Kelly Harrell said Amato had sex with the boy because “she thought she would never get caught doing this.”

Judge Jeffrey Minehart seemingly split the difference between the defense’s request for probation and the prosecution’s request for a 5- to 10-year prison sentence.

“In addition to jail time, the 33-year-old will also have to register as a sex offender after pleading guilty to a sexual relationship with a student, child endangerment and corruption of minors,” NBC Philadelphia reports.

Amato, who will have to report to probation for a decade after her release, was ordered to surrender to prison on July 10.

According to Philly.com:

The judge said he was giving Amato only a county prison sentence because it was her first offense and because he had received 33 letters of support from Amato’s family and friends.

The news site reports Amato graduated magna cum laude from Temple University with her education degree before going on to Cabrini University, where she maintained a 4.0 GPA for her master’s degree.

Amato had worked in the Philadelphia School District for six years before her arrest.

The former teacher must now register as a sex offender, and report in person four times per year, for the rest of her life.