A depraved Alabama special education teacher traded racy text messages with two students and had sex with one of them, authorities said.

Lyndsey Sherrod Bates — a former teacher and volleyball coach at Madison County High School in Gurley — was indicted Friday for allegedly having sex with a 17-year-old boy and sending explicit texts and photos to a second student who was at least 16 years old, court records cited by AL.com show.

Neither student was in Bates’ special education classes at the school, where she resigned one month before she was arrested in April, the website reported.

Bates is the former daughter-in-law of a chief deputy for the Madison County Sheriff’s Office, which issued a statement at the time of her arrest assuring that the relationship played no role in their investigation.

Chief Deputy Stacy Bates, the father of Lyndsey’s ex-husband, Andrew, was “never involved” in the case, Madison County Sheriff Kevin Turner said.

Two days after Lyndsey Bates’ arrest, Andrew Bates filed for divorce, citing “incompatibility” in court filings. The uncontested breakup was later finalized in July, some 14 months after the couple got hitched, AL.com reports.

Lyndsey Bates, who could not be reached for comment Thursday, still has her teaching certificate, according to state education officials.

“This status will be updated as soon as possible,” records cited by AL.com show.

Bates cleared a background check when she was hired at the beginning of the 2018 school year. She said in her resignation letter that she planned to seek a position in a “different area of education,” records show.

Counselors were made available to students after Bates’ arrest, according to a statement released by the district’s superintendent, WAFF reports.

Bates could not be reached for comment Thursday and her Facebook page has been deactivated. If convicted of engaging in a sex act with a student younger than 19, she faces up to 20 years in prison and must register as a sex offender for the rest of her life.

“She’s looking forward to clearing this up and having her day in court,” her defense attorney, Robert Tuten, told AL.com.