(Clinton-AP) -- Custer County prosecutors have charged a former Clinton High School teacher with second-degree rape.

Thirty-two-year-old Keaton Kistler allegedly had consensual sex with a female student at a Clinton hotel on May seventh. According to a police affidavit, the girl was 17 at the time.

Kistler resigned from the school system March 25th.

Kistler and the student first had contact when the girl was in in-school suspension. Kistler supervised that program, which allows students who have been suspended to continue attending school.

The affidavit says Kistler admitted to having sex with the girl in May and admitted he knew she was under 18.

Oklahoma statutes allow people to be charged with rape if the victims are 16- or 17-year-old students and the perpetrators are teachers in the same school system.