A new court filing accuses drug manufacturers of promoting painkillers they said were resistant to tampering by drug abusers even though the companies knew that those protections did not work.

The claims were filed Thursday, the same day that drug manufacturer Endo Pharmaceuticals agreed to withdraw its opioid painkiller Opana ER from the market in a dispute over its “abuse deterrent” formulation.

The Food and Drug Administration last month asked Endo to remove the medication from the market, the first time the agency had done so because of the public health consequences of abuse.

The company reformulated the extended-release drug in 2012 to make it more difficult for abusers to crush and snort. But the FDA said the reformulation led to more people injecting the drug and sparked a major 2015 outbreak of HIV and hepatitis C in a small Indiana county among users who shared needles.

The Dublin-based company said in a statement on its website that it “continues to believe in the safety, efficacy, and favorable benefit-risk profile” of the drug but would comply with the FDA’s request. The move will cost Endo $20 million, the company said.

Sales of the drug totaled $159 million last year, Endo said.

The new legal claims against Endo and another drug company, Purdue Pharma, were added to lawsuits first filed in 2014 by two counties in California. The lawsuits were some of the first in a growing wave of legal actions against drug manufacturers, distributors and retailers. The lawsuits, filed by states, counties and cities across the country, seek to make the drug industry pay for the costs of addressing the opioid epidemic.

Nearly 180,000 people died of overdoses of prescription narcotics between 2000 and 2015, and thousands more have succumbed to heroin and fentanyl as the crisis has evolved.

In the latest claim, Santa Clara and Orange counties contend that companies “created false impressions,” especially among doctors, that the reformulated pills could “curb addiction and abuse.” Abuse deterrent pills are engineered to be difficult to crush or to turn to gelatin when users heat them to create an injectable liquid.

In the case of Endo, the lawsuit claims, the company had studies, “which it failed to disclose,” that showed the drug “could still be ground and chewed.” And users quickly learned that they could turn the drug into a liquid and inject it.

In an interview, Danny Chou, assistant county counsel in Santa Clara, said that Endo was attempting to take advantage of the drug crisis.

“This strategy is trying to take the opioid epidemic and benefit from it,” Chou said, by convincing prescribers that the abuse deterrent formulations were safer.

A spokeswoman for Endo could not immediately be reached for comment.

In the case of Purdue, the lawsuits contend that the company has used abuse deterrence as a selling point in California for the drugs OxyContin and Hysingla since 2013, even though information is easily found on websites and message boards about how to defeat the protections.

A spokesman for Purdue Pharma replied in an email that OxyContin in 2013 met the FDA’s standards for abuse-deterrent labeling, and the agency has not found a move toward injection among oxycodone users when it was reformulated.