Read all of our coverage on 2016 ballot measures at governing.com/ballotmeasures.

America’s pornographic film industry, largely based in California, scored a win Tuesday, evading a ballot measure that opponents say would have cost millions of dollars in annual tax revenue for the state.

Under the ballot initiative, known as Proposition 60, all actors in pornographic films produced in the state would have been required to wear condoms. The measure would have also required producers to pay for actors to get tested and vaccinated against sexually transmitted infections (STIs). Perhaps most controversial, the law would have allowed anyone -- in or outside the state -- to sue a porn producer for failing to comply with the law if California’s Occupational Safety and Health Department doesn’t act on the complaint within 21 days.

The race hasn't officially been called, but the measure currently trails 54 percent to 46 percent, with 91 percent of precincts reporting.

The regulations, critics said, would have been onerous and resulted in adult film productions leaving the state en masse.

In 2012, Los Angeles County passed similar regulations. Voters there approved Measure B, a law requiring adult film actors to wear condoms. The next year, permits for adult films in the county dropped 90 percent. The Los Angeles Times reported in 2014 that many pornography companies were taking their business to other counties in California, Florida, Nevada and even Eastern Europe.

“There is every indication that when faced with regulations and penalties, the industry either ignores them or moves out of county lines,” said Phil Curtis, director of government affairs for APLA Health, which opposes the upcoming statewide measure.

California actually already has a law requiring condom use in adult films. It's been in place since 1992, but is filled with loopholes that make it unenforceable. Prop. 60 would have made the existing law enforceable and closed those loopholes.

It’s an issue that has divided AIDS prevention groups while simultaneously garnering bipartisan support among the state's political parties.

The measure was spearheaded by the Los Angeles-based AIDS Healthcare Foundation. The group has been controversial among the LGBT community because it advocates for condom usage and against the use of medication known as PrEP, for pre-exposure prophylaxis, that can prevent HIV for high-risk individuals, including gay men.

Other supporters of the bill say it's a matter of public health and safety. “Testing alone is insufficient protection,” said Fred Wyand, a spokesperson for the American Sexual Health Association.

“This standard, which uses proven methods to reduce the risk of STI transmission, will protect the health of adult film industry employees while also promoting the well-being of their communities,” the association said in a statement.

But opponents said the bill wasn't just excessively burdensome -- it was unnecessary. The pornography industry already has a testing program in place that appears to work well. There have only been two documented cases of HIV contracted on set in the past decade, and one was in Nevada. A 2014 study found that 23 percent of adult actors have contracted STIs, which is actually lower than the national norm: Half of all Americans will contract some form of STI in their lifetime.

“We understand the concept of worker safety, but we feel that the industry is doing a pretty good job. If the penalties are onerous enough on the industry, it’ll drive the industry out of the state, or worse, the country,” said Curtis of APLA Health.

If the porn industry were to ever leave California, the state would stand to lose millions of dollars in annual revenue. Los Angeles County alone could lose an estimated 10,000 to 20,000 jobs. That may be why the state's Democratic, Republican and Libertarian parties all opposed the measure.

Most AIDS organizations in the state oppose it as well, as do the Transgender Law Center, the Los Angeles LGBT Center and the San Francisco Medical Society. No major newspaper has come out in support, and The Sacramento Bee, San Diego Union-Tribune and San Francisco Chronicle all have written in opposition to Prop. 60.

Read all of our coverage on 2016 ballot measures at governing.com/ballotmeasures.