As the number of deaths attributed to overdoses on legal opioid painkillers have quadrupled since 1999 in the US, pharmaceutical distributors have been quietly stocking pharmacy shelves with these pills in areas where addiction is the highest.

Reporters at the Charleston Gazette-Mail in West Virginia analyzed shipment data from the US Food and Drug Administration and found three major drug manufacturing companies—McKesson, Cardinal Health, and AmerisourceBergen—made $17 billion by sending 423 million opioid painkillers to West Virginia between 2007 and 2012. Six of the 55 counties in West Virginia have the highest death tolls resulting from opioid addiction in the country. Over six years, almost 2,000 patients died from overdoses on hydrocodone and oxycontin pills in those counties.

Prescription drugs go through a lot of hands before they reach their intended patients. Drug companies manufacture these drugs, which are then shipped by wholesale distributors to pharmacies, who order them when doctors call in prescriptions for patients.

In theory, pharmacies act as a safety check for patients receiving drugs—they may notify patients if doctors accidentally prescribe two drugs that cause dangerous interactions together, for example. Given this responsibility, pharmacies (and their pharmacists) have to be licensed; each state has its own Board of Pharmacy that conducts routine inspections.

Distributors are supposed to alert the state’s Board whenever they receive a questionably large order of drugs from a given pharmacy. But, the Gazette-Mail found, they never did in West Virginia between 2007-2012. Simultaneously, the Board continued to rubber stamp these pharmacies, even though they were ordering way more pills than patients could conceivably need for pain. In Kermit, West Virginia—with just 392 residents—a single pharmacy received roughly 9 million pills over the course of two years.

These same distributors blame doctors for the addiction epidemic. It used to be that opioids were only prescribed to patients in a lot of pain near the end of their lives. As John Oliver highlighted earlier this year, opioid manufacturers then began advertising their medication as suitable for patients with chronic pain in the 1990s, and doctors began prescribing them more liberally.

Opioids are incredibly effective, but also potentially addictive and dangerous. Often, patients begin taking opioids for legitimate reasons, like a broken bone or surgery. They can become addicted and either abuse pills as their tolerance increases, or turn to heroin, the cheap, street opioid. If you take too many opioids though, you can overdose: you suffocate as your breathing is suppressed. In March 2016, the US Centers for Disease Control issued new opioid guidelines for doctors, begging them to stop prescribing the drugs as often in an effort to lower addiction and death rates.

But given the path these drugs take to get to patients, it’s a messy blame-chain. “It starts with the doctor writing, the pharmacist filling, and the wholesaler distributing. They’re all three in bed together,” Sam Suppa, a retired Charleston pharmacist, told the Gazette-Mail. “The distributors knew what was going on. They just didn’t care.”