A former Houston middle school teacher has been sentenced to ten years in prison for having sex with a teenage boy at the school where she taught.

Harris County prosecutors say 24-year-old Alexandria Vera was sentenced to prison Friday after admitting last year that she had been involved in a long-term relationship with a 13-year-old boy. At the time of the affair, Vera was teaching English to eighth-graders in Houston’s Aldine Independent School District. She and the boy, who is now in high school, apparently met while he was a student in one of her summer school classes in 2015.

Former teacher initially faced 30 years to life

The Houston Chronicle reports Vera was initially facing 30 years to life in prison when she was first charged in the case, but she agreed to plead guilty and admit to the affair in exchange for a shorter prison sentence.

The newspaper says in arguing for a reduced prison term, Vera’s defense attorney told the judge in the case that the boy had flattered her and seemed to adore Vera. But prosecutors had countered by saying Vera followed a pattern of manipulation in order to what they termed "groom" the teen and his family so she could continue having an affair with the boy. Prosecutors also introduced evidence during the trial that showed Vera had become pregnant by the boy, but that she had the pregnancy terminated.

Vera will be eligible for parole after serving five years in prison

In ordering Vera to serve ten years the judge in the case said determining her punishment was “complicated” because the boy’s parents knew about the relationship between her and the boy and had approved of it. Vera will be eligible for parole after serving five years of the sentence.

Boy's mother wrote letter in support of Vera

According to the Chronicle, before the now former teacher was sentenced several supporters wrote letters on her behalf, including the victim’s mother. The mother of the victim had previously expressed concerns that Vera would lose her job over the affair.