A US judge has ruled in favour of a ban on the filming of bareback porn in LA County, is not unconstitutional, and will remain in place.

The voter-approved law requires porn actors in the county to wear condoms, and federal Judge Dean Pregerson, ruled on Friday to say that it was not unconstitutional, and should continue to be enforced.

The law was enacted with the backing of the AIDS Healthcare Foundation, and received 57% of the vote at the ballot box. As well as making condoms mandatory, it also requires porn producers to receive health permits, and to to provide training in disease prevention. The law applies to both anal and vaginal intercourse.

A challenge to the law was brought by two adult film studios, Vivid Entertainment and Califa Productions, and porn stars Kayden Kross and Logan Pierce, who filed an appeal in federal court. Vivid Studios plans to appeal Friday’s ruling, reports suggest.

The challenge contested the law saying that it violated free speech, and arguing that the testing regime already in place in the industry already protected against STIs and HIV. Judge Pregerson did argue, however that some of the language in the law was too vague.

In his ruling he wrote that one line of the legislation was written so broadly that it “would seem to authorize revoking a permit if a cameraman were working with a cold.”

Some have argued that the law has driven porn production out of LA, as the number of applications for film permits has dramatically decreased, however others have speculated that porn producers are just not applying for the permits any more.