Orange County Superior Court Judge Peter Wilson issued a tentative ruling finding that Johnson & Johnson, Teva Pharmaceutical Industries Ltd, Endo International PLC and AbbVie Inc's Allergan unit not liable for creating a public nuisance.
Wilson said he was aware of the toll the deadly opioid epidemic had inflicted on society and that hospitalisations as a result of drug abuse and opioid-related overdose deaths "starkly demonsonstrate the enormity of the ongoing problem."
But he said that even if any of the drugmakers' marketing contained false or misleading statements about opioids' risks and benefits, the populous Santa Clara, Los Angeles and Orange counties and the city of Oakland could not hold them liable.
That's because "any adverse downstream consequences flowing from medically appropriate prescriptions cannot constitute an actionable public nuisance," the federal and state government had already weighed in on the social utility of the drugs.
J&J in a statement said the decision showed that its "actions relating to the marketing and promotion of its important prescription pain medications were appropriate and responsible, and did not cause any public nuisance."
John Hueston, Endo's lawyer, said the ruling showed the drugmaker's "lawful conduct did not cause the widespread public nuisance at issue in Plaintiffs' complaint."
The other drugmakers did not immediately respond to requests for comment.
The counties did not immediately respond to requests for comment.