Abstinence-only programs don’t qualify as sex education and are in violation of California law, a Fresno County Superior Court judge has ruled.

In his groundbreaking decision, Judge Donald Black said “access to medically and socially appropriate sexual education is an important public right,” and that one district in particular was out of compliance for promoting “medically inaccurate information.”

“This is the first time that abstinence-only-until-marriage curricula have been found to be medically inaccurate,” Phyllida Burlingame, reproductive justice policy director for the American Civil Liberties Union, told SFGate.

In a statement, she added, “This ruling is huge victory for students.”

At issue was the Clovis Unified School District’s curriculum, which some parents charged was promoting celibacy before marriage without mentioning contraceptives. In some cases, it went as far as calling some birth control ineffective.

The district’s health classes also presented videos that likened a sexually-experienced woman to a dirty shoe and promoted sexual-orientation bias with a “One man, one woman, one life,” mantra, SF Gate reported.

Parents filed a lawsuit in 2012, saying Clovis was putting students at risk by failing to provide information on preventing sexually transmitted infections. They dismissed their suit in February 2014 after the district adopted a more “comprehensive” program.

But Black’s April 28 ruling ordered the district to pay attorneys’ fees. He said the lawsuit was “the catalyst that forced the district to revise its ninth-grade sexual curriculum to comply” with California’s 2003 sex-ed law requiring instruction to be comprehensive, medically accurate and free of bias. (PDF)

‪In 2011, an ACLU report revealed that, despite California’s law, many schools weren’t teaching accurate information. Over a quarter of school districts weren’t providing required materials on HIV/AIDS prevention, and 16 percent taught that condoms weren’t an effective way to prevent pregnancy and STIs.