According to an Alabama judge, a 2010 state law that makes it a crime for teachers to have sex with students under the age of 19 is unconstitutional. The ruling comes as Judge Glenn Thompson dismissed charges against two former high school teachers—Carrie Witt, 44, and David Solomon, 27—who had sexual relationships with their students whose ages ranged from 17 to 18.

Witt and Solomon’s lawyers successfully argued that the state law in question “violates teachers’ equal protection rights guaranteed under the 14th Amendment, because it treats educators differently under the law than other citizens,” according to Vice News. After all, other adults who have consensual sex with teenagers who are 16 or older do not have criminal charges. 

"The Court finds this statute unconstitutional as applied to these defendants," Judge Thompson wrote. "In finding so, this court does not endeavor to absolve any wrongdoing or to excuse the defendants. Moreover, the court does not encourage any similarly situated party to engage with impunity in what may very well be criminal behavior."

Prosecutors argued that the teacher-student relationship is unique, and a sexual relationship breaks down the inherent trust and authority required in a classroom. However, this was not enough to convince Judge Thompson. "This court acknowledges that a disparity of power may inherently exist in a teacher/student relationship, but it clearly does not exist in every school employee and every student regardless of where that student is enrolled," he wrote

Moreover, the judge suggested that other states have more specific laws that do not infringe on anyone’s constitutional rights, like certain laws in Texas, Arkansas, and Kansas, which “specifically examine whether a teacher abused their position of power in their sexual relations with students,” according to Vice News

Prosecutors plan to appeal Judge Thompson’s ruling.