CHARLESTON, W.Va. (WBOY) — Attorney General Patrick Morrisey has announced that a settlement has been reached between Walgreens and West Virginia.

According to a release, the settlement comes from an ongoing lawsuit against the pharmacy alleging that they failed to maintain effective controls as a distributor and a dispenser against diversion, which contributed to an oversupply of opioids in West Virginia.

Walgreens agreed to pay the settlement over the course of eight years.

Walgreens was one of several large chain pharmacies sued under the same pretense. Walmart settled in September for $65.07 million. CVS also settled in September for $82.5 million.

Rite Aid was sued for similar litigation and settled last August for $30 million. The only remaining company in the case yet to settle is Kroger.

“We will continue to seek out justice for those affected the most by the opioid epidemic that hit our state the hardest,” Morrisey said. “This and other settlements will not bring back the lives lost from the opioid menace, but our hope is that the money would provide significant help to those affected the most by this crisis in West Virginia.”

The release says that the money from these settlements will be distributed under the West Virginia First Memorandum of Understanding (WVFMOU). The WVFMOU is a prior agreement between state and local governments that contains a plan to use the settlement funds to ease the impact of the opioid crisis on West Virginia.