(Bloomberg) -- Purdue Pharma LP won the backing of about half of U.S. states and territories for a proposed settlement of claims it illegally marketed opioid painkillers, in a deal that could provide about $12 billion to help communities deal with the public-health crisis tied to the medicines, according to people familiar with the negotiations.

Twenty-three states and three territories told a judge Wednesday they’d support a plan under which the billionaire Sackler family –- which owns Purdue –- would file for bankruptcy, hand itself over to a trust controlled by the states, cities and counties that have sued, and sell its U.K.-based drugmaker Mundipharma, the people said. They spoke on the condition of anonymity since they weren’t authorized to speak publicly about the talks.

Under the current proposal, the Sacklers would guarantee to pay $3 billion as part of the settlement, with most of that generated by the Mundipharma sale, the people said. The family has rejected calls by some state attorneys general to hike their guarantee to $4.5 billion, they added.

“The family supports working toward a global resolution that directs resources to the patients, families and communities across the country who are suffering and need assistance,” according to a statement on behalf of all the Sacklers. “This is the most effective way to address the urgency of the current public health crisis, and to fund real solutions, not endless litigation.”

Josie Martin, a Purdue spokeswoman, didn’t immediately return a call for comment on Wednesday.

U.S. District Judge Daniel Polster in Cleveland, who is overseeing more than 2,000 lawsuits filed by U.S. cities and counties seeking reimbursement for the billions they’ve spent to combat opioid addiction and overdoses, has pushed for support of 35 states for the deal, the people said. Forty-eights have also sued.

That number would have made it easier for a bankruptcy judge to oversee settlement payouts to states and local governments as part of Purdue’s Chapter 11 plan, the people said. The company is expected to file for bankruptcy sometime after September 15th, the people said.

Read More: Purdue Opioid Settlement Talks Said to Stall Over Sacklers’ Cash

States that want more from the Sacklers, including Massachusetts, New York and Connecticut, will have to battle in bankruptcy court to extract it from the multibillionaire family, said Chuck Tatelbaum, a Florida-based lawyer who has worked on mass-tort cases that wound up in Chapter 11.

“Without the super majority of 35 states, the case becomes infinitely more complicated,” Tatelbaum said. “A bankruptcy judge will be less inclined to sign off on a deal without that number and then it becomes a question of who gets what and who gives what.”

The current proposal also has the backing of lawyers for some of the cities and counties suing over Purdue’s opioid marketing, the people said. A bankruptcy judge will take that into consideration when deciding whether the pre-negotiated deal will fly in the Chapter 11 case.

Purdue’s plan is to set up a trust similar to those used by asbestos companies, such as Halliburton Co. and W.R. Grace & Co., to deal with waves of litigation over the cancer-causing building material. The trust, which can operate for 20 years or more, oversees settlement payouts to creditors, which in Purdue’s case would be states, cities and counties.

Read More: Sacklers to Remain Billionaire Family If Deal Is Reached

Purdue is seeking a global opioid settlement to avoid facing a jury in Cleveland next month in the first federal trial over the causes of and responsibility for the opioid epidemic. A deal and bankruptcy filing would mean Purdue wouldn’t have to defend itself in that case or any of the other opioid suits. The trial will focus on municipalities’ claims Purdue and other drugmakers fueled an opioid crisis that kills more than 100 Americans daily.

The states and municipalities contend opioid makers, like Purdue and Johnson & Johnson, along with drug distributors such as McKesson Corp and Cardinal Health Inc., of conducting illegal marketing campaigns, failing to adequately oversee orders, and ignoring red-flags about unusually frequent retail sales.

Almost 400,000 people died from opioid overdoses in the U.S. from 1999 to 2017, according to the U.S. Centers for Diseases Control and Prevention. While fatalities from prescription pills have leveled off, deaths from illegal heroin and synthetic opioids have skyrocketed.

The case is In Re National Prescription Opioid Litigation, 17-md-2804, U.S. District Court, Northern District of Ohio (Cleveland).

To contact the reporter on this story: Jef Feeley in Wilmington, Delaware at jfeeley@bloomberg.net

To contact the editor responsible for this story: David Glovin at dglovin@bloomberg.net

©2019 Bloomberg L.P.