A federal judge in Iowa has blocked much of a state law forbidding school libraries from stocking books depicting “sex acts,” in part because he said it was keeping a classic Holocaust memoir off shelves.

U.S. District Court Judge Stephen Locher granted a preliminary injunction against the law, Iowa Senate File 496, on Dec. 29, just before a Jan. 1 deadline for schools to begin enforcing it. The “staggeringly broad” law, he wrote in his opinion, would prevent public schools from stocking “nonfiction history books about the Holocaust.” He pointed specifically to Elie Wiesel’s Night as an example of a book that could be caught in the dragnet.

Other Jewish books have been affected by the law are Maus, Art Spiegelman’s graphic Holocaust memoir, and Judy Blume’s Are You There, God? It’s Me, Margaret.

The injunction represents a major blow to efforts by conservative legislators in Iowa to import a national effort to purge school libraries of books they consider inappropriate. The effort has focused on books about race and sexuality, but has also led to books dealing with Judaism and the Holocaust being challenged or removed.

Iowa’s Republican governor, Kim Reynolds, signed SF 496 into law last year along with other culture-war legislation targeting transgender athletes and student pronouns in schools. Challenges to similar laws are winding through courts in Texas and Florida.