Purdue Pharma, manufacturer of blockbuster painkiller OxyContin, has reached a tentative settlement with 22 state attorneys general and more than 2,000 cities and counties that sued the company over its role in the opioid crisis of the past two decades, people close to the deal said Wednesday.

The executive committee of lawyers representing the cities, counties and other groups in a consolidated federal lawsuit against Purdue and other drug companies is recommending the deal be accepted. But some attorneys general, who sued Purdue and its controlling family, the Sacklers, in state courts are still opposed to a deal.

Under terms of a plan that has been under discussion for months, the Sacklers would relinquish control of their company, Stamford, Connecticut-based Purdue Pharma. Purdue would declare bankruptcy and be resurrected as a trust whose main purpose would be to combat the opioid epidemic.

The deal was said to be worth $10 billion to $12 billion, including a $3 billion payment from the Sacklers' personal funds. It also would include at least $1.5 billion from the sale of the family's international drug conglomerate, Mundipharma, according to the documents and people close to the talks.

The federal plaintiffs and many attorneys general apparently felt the proposal was good enough. Those lawyers "agreed to recommend the MDL claimants move forward in support of the current proposal subject to satisfactory documentation of the essential terms and final documents," they said in a statement. "We feel good progress has and will continue to be made."

But some states objected the Sacklers were not contributing enough cash from their personal fortunes, built almost entirely on the sale of OxyContin and taken out of the company in recent years.

Connecticut Attorney General William Tong said he remained opposed to any deal.

"I cannot speak to other states or divulge confidential negotiations, but Connecticut has not agreed to any settlement," he said in a statement. "The scope and scale of the pain, death and destruction that Purdue and the Sacklers have caused far exceeds anything that has been offered thus far."

It was not clear Wednesday whether the Sacklers had agreed to increase their personal contribution to the settlement or whether other terms had changed.

"There's an incredible incentive to make a deal before bankruptcy, because that would make the process much less expensive for the states and cities," said Adam Zimmerman, a professor of law at Loyola Law School in Los Angeles. If Purdue sought bankruptcy protection without a settlement, "we might see any kind of arrangement tied up in bankruptcy court for a very long time. It could be years," he said.

The enormous consolidated federal trial is scheduled to begin in mid-October with two test cases, Cuyahoga and Summit counties, as the first plaintiffs to make their case against an array of drug companies in court. Meanwhile, more than 40 lawsuits against drug companies are wending their way through state courts. A growing number of states also have sued the Sackler family personally.

Ohio Attorney General Dave Yost, who also opposes the deal, has asked a federal appeals court to delay or halt the federal trial, claiming the smaller jurisdictions are usurping the authority of states. Another 13 states and the District of Columbia have filed briefs in support of that effort, according to Yost's office.

"I think the main motivation [for Yost] has to do with who holds the balance of power with respect to negotiating a global settlement," Zimmerman said. "This is kind of a Hail Mary."

The prescription drug epidemic has taken more than 200,000 lives via overdoses since 1999, according to federal statistics. Another 200,000 deaths are blamed on overdoses from heroin and illegal fentanyl smuggled into the country from China and Mexico.

The trials target drug manufacturers, distributors and retailers, and there are divisions among the defendants as well as among the states. Manufacturers, for example, have raised different legal arguments than distributors.