Drug makers and distributors flooded the US with more than 75bn opioid pills in the crucial years when the country’s epidemic of painkiller addiction and deaths surged to record levels, according to previously secret data released by an American court.

The publication of the Drug Enforcement Administration statistics is a blow to some of the country’s biggest pharmaceutical firms that have paid hundreds of millions of dollars in out of court settlements in part to keep sealed evidence that they profiteered from escalating demand for opioids even as public health officials were declaring an epidemic.

The database covers 2006 to 2012 when opioid prescriptions reached a peak of 282m a year, enough to supply every American adult with a month’s worth of pills. By then, annual sales of narcotic painkillers had surged past $8bn.

US district judge Dan Polster, in federal court in Cleveland, Ohio, is hearing about 2,000 civil cases brought by cities and counties coast-to-coast against opioid makers and distributors, wrapped into a giant case known as a multi-district litigation.

He ordered the release of the data following a year-long legal battle by newspaper companies the Charleston Gazette-Mail in West Virginia, the state worst hit by the opioid epidemic, and the Washington Post.

Deliveries of the two most common opioids, hydrocodone and oxycodone, escalated by more than 50% in the years covered by the database, to 12.6bn pills in 2012 alone, an analysis of the DEA numbers by the Washington Post found.

By then the federal agency the Centers for Disease Control and Prevention (CDC) had declared a public health crisis because of the surging death toll from overdoses. Some of the largest increases in sales were to parts of the country already devastated by opioids.

Nearly nine out of 10 of the pills were manufactured by subsidiaries of three pharmaceutical multinationals – Mallinckrodt, Endo and Actavis, since renamed Allergan.

These companies may not be household names but the pills they sold ardently, often allegedly inappropriately for treatment of chronic pain and while downplaying the risks of addiction, infiltrated communities all across the US in the last two decades.

Mallinckrodt sold nearly 29bn opioids in the six years to 2012, taking 38% of the US market. Actavis was not far behind while Endo sold 11bn opioid tablets. Among Endo’s drugs was a high-strength opioid, Opana, that it was forced to pull from the market because it was killing so many people.

Meanwhile Purdue Pharma is alleged to have played a leading role in driving the mass prescribing that unleashed the epidemic by changing the practice and culture of pain treatment. It was the fourth-largest manufacturer but with a much smaller proportion of the market at about 3%.

However, the volume of sales does not necessarily reflect the impact of individual drugs on the epidemic. Many of the more common painkillers were lower-strength opioids which helped create dependency and addiction but did not pose the same risk of overdose as stronger but less widely prescribed narcotics.

Purdue sold $3bn of its high-strength branded drug, OxyContin, in 2010, about one-third of the opioid market by value at its peak.

The pill consists of oxycodone, a powerful opioid derived from the opium poppy and which is stronger than morphine. The drug has been widely blamed for a surge in overdose deaths through the 2000s.

All of the companies are targets of multiple lawsuits accusing them of driving up opioid sales with false claims about the safety and effectiveness of their drugs as are the members of the Sackler family who own Purdue Pharma.

The newly released DEA data will bolster the plaintiffs’ claim that responsibility for the epidemic runs wide across the drug industry with manufacturers intent on grabbing as large a part of the opioid market as possible with little regard for the unfolding human tragedy.

The opioid makers have denied wrongdoing and, among other things, sought to place blame for the epidemic on doctors overprescribing drugs. But Purdue has previously been hit with a $600m fine for a criminal conviction over its marketing of opioids, and in March the company agreed to pay $270m to settle a civil suit by the state of Oklahoma. Two years ago, Mallinckrodt paid a $35m settlement with the justice department over its opioid deliveries.

County-by-county data shows that sales of opioids were often focused on areas most blighted by the epidemic, including some of the poorest parts of Appalachia. At one point, the highest per capita deliveries were to rural Mingo county, West Virginia, where “pill mills” and pharmacies were raking in money by churning out prescriptions without question to anyone who paid cash. The practice drew caravans of drug users from hundreds of miles away.

Large numbers of the opioids delivered to Mingo county were by the country’s biggest drug distributor, McKesson Corporation. The Washington Post said the DEA data showed that McKesson and five other companies, including the pharmaceutical chains Walgreens, CVS and Walmart, were responsible for the bulk of painkiller deliveries across the US.

McKesson, which is listed seventh in the Fortune 500 paid a record $150m fine two years ago to settle federal accusations that it was making suspiciously large deliveries of opioids to places where there could not be a legitimate demand for so many pills.

It was also among companies that paid millions of dollars to settle lawsuits by West Virginia’s attorney general that they flooded his state with opioids.

A former head of the DEA division responsible for monitoring prescription drug distribution, Joe Rannazzisi, has previously told the Guardian that he attempted to launch criminal prosecutions against McKesson and other distributors but he ran into the power of the industry’s political lobbying and was blocked by justice department officials.