The drugmaker Purdue has moved one step closer to emerging from bankruptcy protection after a further 15 US states dropped their objections to a settlement intended to resolve litigation relating to the opioid crisis. Purdue filed for Chapter 11 bankruptcy in September 2019 after the OxyContin maker was hit with thousands of lawsuits from states, towns and cities across the US. The claimants are seeking funds to address a devastating opioid crisis that has caused almost 500,000 deaths in the US over the past two decades.

A large number of US states and territories had already signed on to a proposed financial settlement with Purdue and some members of the Sackler family that own it. But others resisted, arguing that more money was needed.

In an attempt to secure the holdout states’ support and clear the path towards an exit from bankruptcy, Sackler family members who own Purdue Pharma increased the amount of cash they would contribute to a potential bankruptcy settlement from $3bn to more than $4.3bn.

Following court-supervised mediation, 15 states — including New York, Massachusetts and Pennsylvania — have now reached an agreement in principle with Purdue, according to a filing in bankruptcy court late on Wednesday. But several holdouts, such as California and Maine, remain.

Maura Healey, the Massachusetts attorney-general, called the terms of the settlement “unprecedented”. More than $4.3bn will be paid over nine years by members of the Sackler family that own Purdue. According to the US court filing, control of two Sackler family charities — required to hold at least $175m — will be handed to the National Opioid Abatement Trust, to finance programmes aiming to alleviate the impact of the crisis.

The agreement also bans some members of the Sackler family that owned Purdue from having naming rights related to their charitable donations until all the money has been paid and they have “exited, worldwide, all businesses that engage in the manufacturing or sale of opioids”, the court filing said.

Tens of millions of documents, including correspondence between the company and their lawyers, will also be made public.

Healey said that Purdue would be sold or wound down by 2024, adding: “We will put an end to their legacy.” Letitia James, the New York attorney-general, said on Thursday that while the agreement was “not perfect . . . it gets one of the nation’s most harmful drug dealers out of the opioid business, once and for all”.

“This resolution to the mediation is an important step toward providing substantial resources for people and communities in need. The Sackler family hopes these funds will help achieve that goal,” the Raymond and Mortimer Sackler families said in a statement.

Purdue said: “We will continue to work to build even greater consensus for our plan of reorganisation, which would transfer billions of dollars of value into trusts for the benefit of the American people and direct critically-needed medicines and resources to communities and individuals nationwide who have been affected by the opioid crisis.”

The agreement requires the approval of the judge overseeing Purdue’s bankruptcy.

The company’s bankruptcy is one of the most high-profile cases in the opioid crisis. Thousands of lawsuits have been brought against pharmaceutical companies and distributors in the US, which are accused of mis-marketing highly addictive painkillers and contributing to a crisis that has raged across America. Opioid overdoses account for the majority of US deaths from drugs.

Trials against other companies are currently under way in New York and California.

Purdue previously agreed a criminal and civil settlement with the US Department of Justice potentially worth more than $8.3bn.