A Kellyville High School teacher who resigned after allegedly exchanging sexually explicit texts with a student has been arrested for second degree rape.

According to reports, Kalyn Darby Thompson, 25, began exchanging text messages with the student in December, when he was 17 years old. When he turned 18 in March, investigators say, the relationship between the student and the teacher turned sexual. Kellyville school administrators say that Thompson resigned in mid-April, admitting that some of the texts between her and the teen were sexual in nature.

Although Thompson was supposed to refrain from contact with the teen, she was allegedly seen in his truck by two students who took a picture of the pair and turned it in to administrators, who then contacted police.

The student's mother says the teen admitted to having sex with Thompson while she was still a teacher, and thus Thompson was arrested on second degree rape complaints.

In Oklahoma, the age of consent is 16, but statutory rape laws prohibit sex between any student under the age of 20 and any person aged 18 or older who is an employee of the same school system. If Thompson and the student had not begun a sexual relationship until after she resigned, it would not have been illegal. However, the sexually explicit text messages and the teen's alleged admission to sex with the teacher prior to her resignation both indicate illegal sex acts.

In 2012, an attorney representing a high school basketball coach Tyrone Nash, who was recently convicted of rape for sex with a student, challenged the state's law prohibiting consensual sex between students and teachers. The lawyer pointed out a ruling in Arkansas where the sexual relationship between a teacher and his 18-year-old student was determined to be a personal privacy issue and not a criminal matter. In Nash's case, an Oklahoma judge upheld the law and said that the Arkansas case had no bearing on Nash's since the student in Arkansas was a legal adult, whereas the 16-year-old student with whom Nash was involved was a minor.

It will be interesting to see if Thompson's attorney tries a similar approach, challenging the constitutionality of a law that prohibits sex between consenting adults in certain situations. It doesn't seem likely that Oklahoma would be too eager to get rid of a law that prohibits sex between students and teachers or inmates and Department of Corrections employees, but if it is determined unconstitutional, the state would have no choice.