West Virginia has settled for $83 million with Walgreens for the pharmacy store chain’s role in perpetuating the opioid crisis in the U.S. state with the most per capita overdose deaths, Attorney General Patrick Morrisey announced Wednesday.

That brings the total West Virginia dollars brought in from opioid litigation to more than $950 million, according to the Attorney General’s office. The state now has one remaining opioid case to close out. A trial with Kroger is set for June.

“We’re all down, one to go,” Morrisey said. “We can see the light at the end of the tunnel.”

The settlement resolves a lawsuit that alleged the pharmacy chain failed to maintain effective controls against diversion that contributed to oversupply of opioids in the state.

Walgreens agreed to pay the settlement within an eight-year period, Morrisey said. The money from all opioid settlements will be distributed throughout the state to abate the opioid crisis.

Walgreens is part of a larger litigation involving other major pharmacies — Kroger, Walmart, CVS and Rite Aid.

Morrisey announced in September that Walmart and CVS Pharmacy were settling with West Virginia for a combined total of $147 million in a lawsuit over the companies’ roles in contributing to the oversupply of prescription drugs that fueled the opioid epidemic.

In August, West Virginia cities and counties reached a $400 million tentative settlement with three major U.S. drug distributors: AmerisourceBergen, Cardinal Health and McKesson. In April, Morrisey announced the state would receive $99 million in a settlement finalized with Johnson & Johnson’s subsidiary Janssen Pharmaceuticals Inc.

The West Virginia Attorney General’s Office is alleging that Kroger failed to report suspicious drug orders to the U.S. Drug Enforcement Administration and the West Virginia Board of Pharmacy. Further, the state alleges that Kroger effectively had no suspicious order monitoring policy for a period of time when opioids were being distributed in significant quantities throughout the state.