The state of West Virginia on Wednesday settled a lawsuit against the nation’s largest drug distributor, which had been accused of shipping nearly 100 million doses of addictive opioids to residents over a six-year period.

The state’s suit accused McKesson Corporation of putting profits ahead of residents’ welfare by failing to investigate, report or stop suspicious drug orders as required by law, and fueling a widespread drug epidemic.

McKesson, the sixth-largest American company in terms of revenue, reported over $208 billion in the last fiscal year. The giant distributor funneled enough hydrocodone and oxycodone to supply every legitimate patient with nearly 3,000 doses, state officials said.

Tiny Boone County, with a population of fewer than 25,000, received 1.2 million doses of hydrocodone and oxycodone between 2007 and 2012, the lawsuit claimed.