A Texas middle school teacher is facing felony charges after reportedly admitting to having a sexual relationship with her 13-year-old student. Alexandria Vera says the boy's family approved of the affair and were even supportive when she became pregnant. (Deirdra O'Regan/The Washington Post)

A Texas middle school teacher who was impregnated by a 13-year-old student could face up to 30 years in prison after pleading guilty to aggravated sexual assault of a child.

Alexandria Vera, who was arrested in June, told police that she fell in love with one of her students after the two began a relationship through Instagram messages. The 24-year-old former eighth-grade English teacher at Stovall Middle School in Houston also said that the boy’s family was supportive of the affair.

Vera, who pleaded guilty on Wednesday, was initially charged with continuous sexual assault of a child, which carries a maximum punishment of life in prison. By pleading guilty to a lesser charge, her sentence was capped at 30 years, according to the Houston Chronicle.

She also is eligible for deferred adjudication, in which case she will be placed on probation and will have no felony on her record if she successfully completes the terms, the Houston Chronicle reported.

“We’re very much hoping for deferred adjudication,” Vera’s attorney, Ricardo Rodriguez, said, according to the Houston Chronicle.

Vera told police that she met the boy during summer school in 2015. She said she initially resisted the boy’s advances until sometime last fall, when she agreed to hang out with her student.

Prosecutors say Vera and the teen had sex almost every day for nine months. She told investigators that they love each other, according to court documents. During the relationship, Vera told her neighbors that the boy was her brother, according to KHOU, a CBS affiliate.

The boy’s parents had known of the relationship since October of last year, and they accepted it, Vera told police.

A police investigation began earlier this year after the school principal received a tip about Vera. She told police that she had gotten pregnant and had an abortion after Child Protective Services questioned her about the relationship in February, according to KTRK-TV, an ABC affiliate.

Vera has been free on a $100,000 bail and has been wearing a GPS ankle monitor. She’s scheduled for a sentencing hearing in January.

The now-14-year-old boy, who also admitted to the sexual relationship, is in foster care and will remain there at least until August, according to KHOU. The boy’s mother also was investigated by Child Protective Services, according to media reports.

More from Morning Mix

‘Ultimate act of cowardice’: Three officers in 3 cities targeted and shot, one fatally

Police, citing ‘ongoing riot,’ use water cannons on Dakota Access protesters in freezing weather

The aftermath of the ‘Hamilton’-Trump feud turns ugly in Chicago, gets weird in Canada