Walmart, among the largest retailers in the United States, has agreed to pay $3.1 billion over sweeping allegations that it played a role in the nation’s opioid epidemic — $116 million of which will go to New York, according to a Tuesday announcement by Attorney General Tish James.

The nationwide settlement was the result of years-long litigation brought by a coalition of state attorneys general co-led by James and 15 other states. The deal is not final as it requires 43 states to agree with the settlement by the end of the year.

“Pharmacies such as Walmart played an undeniable role in perpetuating opioids’ destruction, and my fellow attorneys general and I are holding them accountable,” James said in a statement.

Walmart will also be subject to certain oversight measures under the settlement announced Tuesday designed to combat fraudulent opioid prescriptions and other harmful practices.

The agreement, in which Walmart denies claims of wrongdoing, is the latest in a litany of high-profile settlements involving states that had sued distributors and manufacturers over the opioid crisis, which has devastated communities across the United States.

James announced earlier this month that Teva Pharmaceuticals Ltd., a drug manufacturer embroiled in sprawling opioid litigation, would pay the state up to $523 million in a similar settlement. A jury in Suffolk County ruled in 2021 that Teva was liable in a months-long trial over its alleged role in fueling the opioid crisis. Her office said “promising negotiations” are also underway with the pharmacy chains CVS and Walgreens.

Several other large companies have paid settlements in response to opioid litigation.

Roughly three-quarters of overdose deaths in 2020 were from opioids, according to the Centers for Disease Control and Prevention. The CDC adds that “from 1999–2020, more than 564,000 people died from an overdose involving any opioid, including prescription and illicit opioids.”

“Too many families have lost loved ones to the opioid epidemic, and too many people have lost years of their lives to addiction,” said North Carolina Attorney General Josh Stein, who also announced the settlement on Twitter.

In a corporate statement provided by Walmart spokesperson Randy Hargrove, the company said it "strongly disputes the allegations in these matters."

"Walmart believes the settlement framework is in the best interest of all parties and will provide significant aid to communities across the country in the fight against the opioid crisis, with aid reaching state and local governments faster than any other nationwide opioid settlement to date, subject to satisfying all settlement requirements," the statement continued.

This story has been updated with a statement from Walmart.