Morgan County Circuit Judge Glenn Thompson issued the ruling Thursday that, at least for now, will keep former Decatur High School teacher Carrie Witt and David Solomon, an ex-aide at Falkville High School, from facing charges.

According to AL.com, Witt, 44, was arrested in March 2016 when police said she had sex with two teenagers — one who was 17 and the other 18 — when they were her students at Decatur High School. Solomon, 27, was accused of having sex with a 17-year-old student.

The law the judge has deemed unconstitutional prohibits any school employees from having sex with students who are younger than 19. Teachers or other school employees in violation of the law can be charged with a Class B felony that carries a punishment up to 20 years in prison. They must also register as sex offenders if convicted. Consent is not a defense.

However, the law is harsher on teachers and school employees than other citizens, who do not face criminal prosecution for having sex with 16-year-olds. State prosecutors, AL.com reported, have argued the law is constitutional and designed to protect students.