The two largest drugstores in the country, CVS Pharmacy and Walgreens, have issued preliminary deals worth a combined total of over $10 billion to settle thousands of lawsuits filed over their alleged failure to curb sales of prescription narcotics, according to Law360.

According to plaintiffs, pharmacies like CVS, Walmart, Walgreens and others failed to enforce their own opioid distribution policies. These allegedly negligent actions led to an exacerbation and acceleration of the opioid epidemic’s effect on the nation.

The opioid epidemic has affected thousands of communities across the U.S., from negatively impacting the economy to correlating with a rise in crime. Opioid addiction has led to the use and abuse of heroin and prescription opioids like oxycodone. The settlement, announced Nov. 2, will be used by states to fund drug treatment programs. 

In a quarterly earnings report filed with the U.S. Securities and Exchange Commission (SEC), CVS pharmacies announced that it had entered mediation with state attorneys general and plaintiffs’ attorneys in October and has emerged with a tentative $4.9 billion settlement for states, counties, and cities, as well as a $130 million settlement for Native American tribes. These settlements would be drip-fed to the municipalities over the course of 10 years.

In a separate filing with the SEC, Walgreens stated that it would disburse $4.8 billion to states, $155 million to Native American tribes, and provide “approximately $753.5 million in attorneys’ fees” over the course of six years for a total of $5.7 billion.

The settlement proposal has received positive responses from plaintiffs’ attorneys who call it an important step in holding pharmacies accountable for their alleged role in the opioid epidemic. The $10 billion settlement was called a landmark agreement-in-principle by plaintiffs’ attorneys.

In addition to CVS and Walgreens, an anonymous source disclosed to Law360 that Walmart is expected to settle its opioid lawsuits for just over $3 billion. In addition to monetary payment, the settlements are expected to include changes to the ways that these pharmacies sell and distribute controlled substances. At present, all non-monetary terms are still being negotiated.