Tablets of the opioid-based Hydrocodone at a pharmacy in Portsmouth, Ohio, June 21, 2017.
Tablets of the opioid-based Hydrocodone at a pharmacy in Portsmouth, Ohio, June 21, 2017. Reuters / Bryan Woolston

West Virginia's cities and counties reached a $400 million opioid settlement with drug distributors McKesson Corp, AmerisourceBergen Corp and Cardinal Health Inc , West Virginia attorney general Patrick Morrisey said Monday.

The settlement resolves allegations by more than 100 cities and counties that the three drug distributors fueled an opioid crisis by oversupplying West Virginia with pain medication, and builds on the companies' previous settlements with the state Attorney General's office.

"I'm happy to see the judicial system work as it should by benefiting West Virginia communities that have been hit hard by opioid abuse," Morrisey said in a statement. "This settlement, along with other settlements from other cases, will provide significant help to those affected the most by the opioid crisis in West Virginia."

Cardinal Health said in a statement that the funds will provide funds to West Virginia communities in need, and that it remains to being "a part of the solution to the opioid epidemic."