Court documents made public as part of Baltimore City’s lawsuit against pharmaceutical companies reveal how city officials believe they fueled the opioid crisis, but drug transaction data shows just how many pills were funneled into Maryland.

Over 2 billion pain pills went to pharmacies, hospitals and providers over a 14-year period from 2006 to 2019. The transaction data comes from The Washington Post’s opioid distribution database of records from the Drug Enforcement Administration’s Automation of Reports and Consolidated Orders System (ARCOS), which the newspaper gained access to via a court order. The Post limited the database to hydrocodone and oxycodone, which dominated the market.

The Baltimore Sun analyzed Maryland data from The Washington Post’s database to illustrate the statewide scope of the details revealed in the city’s lawsuit. The Maryland data shows how opioid distribution changed over time.

Western Maryland’s Allegany County received an average of 59.2 pills per person per year — the highest rate among the state’s 24 jurisdictions and more than double the state’s rate of 26.2.

Kent County on the Eastern Shore and Washington County in Western Maryland had the next highest rates.

Among Baltimore City and the five immediately surrounding counties, Harford County had the highest rate, and eighth highest in the state, at 36.6 pills a person per year. Baltimore County had the ninth highest in the state at 35.2. Baltimore City’s rate was 30.5. Combined, the Baltimore area averaged getting 33 pills per person per year from 2006 to 2019.

The state’s peak for receiving prescription pain pills occurred in 2011 at 33.5 pills per person. From 2012 onward, the number of pills per person per year declined. The decline corresponded with an increase in opioid-related overdose deaths, which increased more than three-fold from 2012 to 2019, driven largely by illicit drugs, according to the Maryland Department of Health.

Just three companies out of more than 150 distributed nearly three-quarters of pills in the entire period — McKesson, Cardinal Health and AmerisourceBergen.

But the five companies with the highest opioid distribution peaked at different points between 2006 and 2019.

McKesson, which was responsible for over a third of the total pills distributed in Maryland, peaked in 2011 at 75 million pills — the same year the state’s overall peak occurred. Cardinal Health peaked a year prior in 2010 at 50 million pills. AmerisourceBergen didn’t begin a steep two-year jump until 2012, peaking at almost 38 million pills in 2016. Both CVS and Walgreens contributed fewer than 20 million pills a year until halting distribution in 2015.

Records show the top three distributors in Maryland between 2006 and 2019 concentrated shipments in different areas of the state. Active on the Eastern Shore, McKesson sent the most per capita to Kent County at 13 pills per person per year.

Cardinal Health distributed the most pills per person per year in parts of Western Maryland and Southern Maryland. Amerisource’s shipments were concentrated in Kent, Harford, Washington and Cecil counties.