An attorney for the state of Texas urged a panel of federal appellate judges Wednesday to restore a law banning the sale of “sexually explicit” books to school libraries.

A federal district judge had issued a preliminary injunction in September, saying the law likely violates the First Amendment free-speech rights of vendors who would be required to rate the sexual content of the books they intend to sell.