A Texas teacher won’t serve jail time after being convicted for an alleged drug-fueled romance with a female student, according to reports.

Emily M. Rogers, 25, was sentenced Thursday to 10 years probation on charges for an improper relationship between an educator and student, the San Antonio Express-News reported. She had faced up to 20 years in prison.

Rogers, of San Antonio, was a social studies teacher at Smithson Valley High School when she became involved with an 18-year-old student.

The former student testified Wednesday that she had loved Rodgers, then 22, and had numerous sexual encounters with her.

She claimed that they took Xanax at school, smoked pot and snorted cocaine during off-campus excursions.

“We smoked weed on multiple occasions,” she said in court.

In an attempt to hide the relationship, the victim said she started dating another student, who discovered her illicit tryst with Rogers and notified police.

The victim testified that their relationship continued after Rogers’ arrest in April 2015. Rogers resigned from the school district after authorities launched an investigation.

Rogers’ lawyer John Kuntz argued that there was no evidence that the pair had sex.

“Even if you believe Emily fell in love with [the student], that is not a crime,” Kuntz said, according to mySA. “The crime is the sex. Where is the proof of that?”

The former teacher did not testify in the trial.

The jury unanimously convicted her Wednesday for her involvement with the teen.

In addition to the probation, Rogers was ordered to pay a $2,500 fine for both charges.