An effort by two Virginia Republicans to prevent stores and schools from providing books with sexual content to readers under 16 has failed, the Washington Post reports.

A judge in the state dismissed a lawsuit filed by politicians Tim Anderson and Tommy Altman that sought to ban Barnes & Noble locations, as well as the school district in Virginia Beach, from giving young readers access to two books: Sarah J. Maas’ fantasy novel A Court of Mist and Fury and Maia Kobabe’s graphic memoir, Gender Queer.

Both books have been the target of challenges and bans before, particularly Gender Queer, which the American Library Association listed as the most frequently challenged book of 2021.

The judge in the case, Pamela Baskervill, ruled that the obscenity law under which the suit was filed is “unconstitutional on its face.”

Anderson, a state delegate, told the New York Times that he would try to introduce legislation that would prevent minors from having access to sexually explicit books, and floated the idea of a rating system for literature.

“Putting a label on the book that just says ‘adult content’ gives the retailers the understanding that these books can be sold but they can’t be sold to minors,” Anderson said. “And that’s where we were trying to go, and that’s as far as we were trying to go on those books.”

Michael Schaub, a journalist and regular contributor to NPR, lives near Austin, Texas.