OAKLAND (AP) – A California judge has ruled for top drug manufacturers as local governments seek billions of dollars to cover their costs from the nation’s opioid epidemic.

Orange County Superior Court Judge Peter Wilson issued a tentative ruling Monday that said the governments hadn’t proven the pharmaceutical companies used deceptive marketing to increase unnecessary opioid prescriptions and create a public nuisance.

READ MORE: Scott Peterson Resentenced To Life Without Parole; Laci's Mom: 'You Will Always Be Their Murderer'

“There is simply no evidence to show that the rise in prescriptions was not the result of the medically appropriate provision of pain medications to patients in need,” Wilson wrote in a ruling of more than 40 pages.

“Any adverse downstream consequences flowing from medically appropriate prescriptions cannot constitute an actionable public nuisance,” the ruling said.

Oakland, Los Angeles, Orange and Santa Clara counties argued that the pharmaceutical companies misled both doctors and patients. They say the drugmakers downplayed the risks of addictions, overdoses and deaths while overstating the benefits for long-term health conditions.

READ MORE: UPDATE: Parents Who Sent Child With COVID to Corte Madera School Could Face Criminal Charges

The drugmakers say opioids are appropriate for many chronic-pain patients.

Both sides acknowledged there was an opioid abuse epidemic.

Wilson said drug abuse hospitalizations and overdose deaths “starkly demonstrate the enormity of the ongoing problem.”

MORE NEWS: Free COVID Clinic In Oakland Unexpectedly Shuts Down

© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.