Four US drugs giants have agreed to pay $26bn (£19bn) to settle claims they helped fuel an opioid addiction crisis.
Under the proposal unveiled by a group of state attorney generals on Wednesday, three drugs distributors are expected to pay $21bn.
Drug-maker Johnson & Johnson (J&J) will pay $5bn over the next five years.
The New York attorney general Letitia James said the firms fuelled "the fire of opioid addiction for more than two decades".
In a statement she said: "While no amount of money nor any action can ever make up for the hundreds of thousands of lives lost or the millions more addicted to opioids, we can take every action possible to avoid any future devastation."
The proposed agreement would resolve nearly 4,000 claims in federal and state courts against the four companies, if approved by a significant number of states and governments.
McKesson, Cardinal Health and AmerisourceBergen were accused of ignoring shipments of painkillers being diverted to illegal channels, while J&J allegedly downplayed the the risk of addiction in its marketing materials for opioids, which the firm stopped making in 2020. All companies have denied the allegations.
Opioids are a class of powerful drugs found in opium poppies that can be used to block pain signals between the brain and the body.
They can be found as legal prescription medications, but they can also be found as illegal street drugs, such as heroin.
Opioid addiction to both legal and illegal drugs has been a serious, ongoing problem in countries such as the US, which had nearly half a million deaths from overdoses between 1999 and 2019, according to the US Centers for Disease Control and Prevention.
Most of the money from the settlement will be used on opioid treatment and prevention programmes.
Amounts will be allocated to states according to population size, the number of overdose deaths and the number of opioids prescribed.
In a joint statement, the drugs distributors said they remain "deeply concerned about the impact the opioid epidemic is having on individuals, families, and communities across the nation and are committed to being part of the solution."
The four firms added that while they strongly dispute the allegations, they hoped the settlement would provide "meaningful relief to communities across the United States".
Michael Ullmann, executive vice president and general counsel at drug manufacturer J&J said: "We recognise the opioid crisis is a tremendously complex public health issue, and we have deep sympathy for everyone affected.
"This settlement will directly support state and local efforts to make meaningful progress in addressing the opioid crisis in the United States," he added.
'Not nearly good enough'
It also calls for the use of data-driven systems to detect suspicious opioid orders from customer pharmacies and the prohibition of shipping suspicious orders by drugs distributors.
The proposed agreement would also require J&J not to lobby on any opioid-related issues.
States will have 30 days to decide whether or not they want to sign onto the agreement, while local governments have 150 days.
New York announced that it had signed up, but Washington, for example, has already rejected the settlement.
Its attorney general wrote on social media that the settlement was "not nearly good enough".
The state trial against the three drug distributors begins in September, while a January date is set against J&J.
"We look forward to walking into a Washington state courtroom to hold these companies responsible for their conduct," attorney general Bob Ferguson tweeted.