According to two people familiar with the negotiations, CVS Health Corp, Walgreens Boots Alliance Inc, and Walmart Inc have informally agreed to pay nearly $13.8 billion to settle thousands of state and local government lawsuits accusing the chains of improperly handling opioid medications.

According to the people, the proposed settlement asks for Walmart to pay $3.1 billion, primarily up front, and Walgreens and CVS to each pay $5 billion over ten years. The sources declined to give their names because they claimed they weren't allowed to discuss the situation in public.

Walgreens, CVS, and Walmart all declined to comment. Requests for comment from a representative of the plaintiffs' lawyers in the case were not immediately answered.

The proposed settlement, which would be the first national agreement with retail pharmacy businesses, comes after federal opioid settlements totaling more than $33 billion with drug manufacturers and distributors.

State and municipal governments charged drug companies with downplaying the hazards associated with their opioid painkillers, and distributors and pharmacies with ignoring warning signs that prescriptions were being diverted into criminal trafficking, in more than 3,300 cases filed since 2017.

They claimed that the human toll and strain on public health and law enforcement were a public nuisance that the firms should foot the bill to remedy.

The three biggest retail pharmacies in the nation by market share are CVS, Walgreens, and Walmart. Even while claims against smaller, more locally focused drugstore owners like Rite Aid Corp and Kroger Co. are still pending if their settlement is approved, it will conclude much of the extensive, years-long litigation over opioids.

Plaintiffs had won some substantial trial victories against pharmacy chains, including a $650.6 million verdict against CVS, Walgreens Boots Alliance, and Walmart Inc. in favour of two Ohio counties, as well as a finding that Walgreens was responsible for the San Francisco opioid epidemic.

The three biggest U.S. drug distributors paid out $21 billion in prior settlements, $5 billion from Johnson & Johnson, $4.35 billion from Teva Pharmaceutical Industries Ltd., $2.37 billion from AbbVie Inc., and $450 million from Endo International Plc.

In order to battle the opioid problem, which according to federal government data has resulted in close to 650,000 overdose deaths since 1999 and is only getting worse, state and local authorities have said that they will use the money from the settlements.

The 1990s saw a huge increase in opioid prescriptions as businesses aggressively advertised the drugs—long used largely in cancer patients—as a secure means of managing all forms of chronic pain.

According to the US Centres for Disease Control and Prevention, opioid overdoses—including those involving prescription drugs and heroin—rose sharply during the COVID-19 pandemic, rising 38% in 2020 over the prior year and another 15% in 2021.

The government believes that fentanyl, a potent synthetic opioid produced illegally, is mostly to blame for the recent spike in overdose cases.

According to a congressional assessment released last month, the opioid crisis will cost the economy $1.5 trillion in 2020 alone.