CVS and Walgreens have agreed to pay more than $10 billion to several states in a settlement of lawsuits brought against them alleging their roles in the opioid crisis.

CVS would pay nearly $5 billion over 10 years, while Walgreens would pay $5.7 billion over 15 years, according to statements released by state attorneys general.

"As one of the largest pharmacy chains in the nation, we remain committed to being a part of the solution, and this settlement framework will allow us to keep our focus on the health and wellbeing of our customers and patients, while making positive contributions to address the opioid crisis," Walgreens said in a November statement.

However, neither company has admitted to wrongdoing.

States have until Dec. 31 to accept the settlements. If they do so, local governments will then have the option to acquire a portion of the compensation. Several state attorneys general have announced their intent to accept, including Pennsylvania, New York, California, Oregon, Massachusetts and North Carolina.

California is expected to get about $510 million from the settlement, Pennsylvania will receive about $450 million and New York will get about $458 million.

Payments should be distributed around the second half of 2023.

"In New York and across the nation, communities continue to mourn family, friends and loved ones lost to the opioid crisis," New York Attorney General Letitia James said Monday. "Though we cannot reverse the devastation, my fellow attorneys general and I are committed to holding those who allowed this epidemic to run rampant through our country to account."

In total, corporations have had to pay $54 billion in settlements. Walmart agreed last month to pay more than $3 billion to states, while four pharmaceutical companies – Johnson & Johnson, AmerisourceBergen, Cardinal Health and McKesson — agreed to pay $26 billion in February.

Deaths from opioid drug overdoses were 8.5 times higher in 2020 than in 1999. More than 564,000 people died from opioid drug overdoses during that time period, according to the Centers for Disease Control and Prevention.

The opioid crisis began in the 1990s with prescription opioids, while 2010 marked an increase in deaths from heroin, and 2013 sparked the prevalence of synthetic opioids, namely fentanyl, the CDC said. [Copyright 2022 NPR]