The making of porn films has been halted in Los Angeles County, just days after a judge upheld a ban on the filming of bareback porn in the county, because an actor has tested positive for HIV.

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.

A moratorium on production was announced on Wednesday. The performer was not identified, and officials did not say when the positive test was recorded.

“The moratorium will be lifted once the risk of transmission has been eliminated,” Diane Duke, executive director of the industry trade group the Free Speech Coalition, told The Associated Press in an email.

Ms Duke said she did not think the actor was infected on a film set.

A similar halt to the production of adult films took place in 2012 when an outbreak of syphilis took place.

The porn actor’s sex partners are being tested currently for HIV by doctors are Adult Protection Health and Safety Services, which works with the porn industry.

The law banning bareback porn 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.