Courtroom showdowns still face OxyContin maker Purdue Pharma LP and the family that owns it, but after a tentative settlement reached on Wednesday with thousands of US local governments and more than 20 states, the fight is to be less about the damage done by the company and more over how to divide its assets.

The agreement could be worth up to US$12 billion over time. That amount includes future profits for the company, the value of overdose antidotes it is developing and cash payments of US$3 billion to US$4.5 billion from the Sackler family.

The amount is contingent on the sale of the family’s international drug company, Mundipharma International Ltd, which, like Purdue, has been criticized for overselling the benefits of its powerful prescription opioid painkillers and understating the risks.

Critics are fuming that the deal will not be worth close to the stated US$12 billion, that it would not force internal company documents to be made public and that it does not do enough to hold the company or its owners responsible.

“The idea that Purdue might get away without having to admit any wrongdoing flies in the face of every definition of justice and accountability known to the human race. It’s unconscionable,” said Ryan Hampton, a Los Angeles-based advocate for people in recovery from opioid addiction.

For the Stamford, Ohio-based company, one of the next steps is a bankruptcy filing, which would likely end lawsuits filed against the company by about 2,000 counties, municipalities, Native American tribes, unions and hospitals, along with nearly every US state.

Parities that do not sign onto the settlement could raise objections in bankruptcy court — and some states have made it clear that that is their plan.

On the other side, several attorneys general said that the agreement was a better way to ensure compensation from Purdue and the Sacklers than taking their chances if Purdue files for bankruptcy on its own.

However, even advocates of the deal cautioned that it is not yet complete.

“There’s still a lot of telephone calls going on. I think we see the outlines of a thing that might be, but it’s not yet,” Ohio Attorney General Dave Yost said in an interview.

Opioid addiction has contributed to the deaths of about 400,000 Americans in the past two decades, hitting many rural communities particularly hard.

The tentative agreement and expected bankruptcy filing would remove Purdue from the first federal trial over the opioids epidemic, scheduled to begin next month in Cleveland, Ohio.

In a statement, the company said that it “continues to work with all plaintiffs on reaching a comprehensive resolution to its opioid litigation that will deliver billions of dollars and vital opioid overdose rescue medicines to communities across the country impacted by the opioid crisis.”

Members of the Sackler family said in a statement that there are good reasons for governments to join the settlement.

“This is the most effective way to address the urgency of the current public health crisis and to fund real solutions, not endless litigation,” they said.