The opioid epidemic has been called the worst drug crisis in American history. Death rates now rival those of AIDS during the 1990s, and with overdoses from heroin and other opioids now killing more than 27,000 people a year, the crisis has led to urgent calls for action.

The epidemic didn’t happen overnight. Over the course of more than a decade, it has grown into a problem destroying lives across the nation, regardless of age, race, wealth or location. Here’s a look at how it happened and who is most affected.

Drugs now kill more Americans than cars

In 1999, there were more than twice as many motor vehicle deaths as fatal drug overdoses. By 2014, those numbers had flipped, with almost 40 percent more deaths from overdoses than car crashes. In all, 29,230 people died in car accidents in 2014, while 47,055 died from a drug overdose.

Cocaine used to be the leading killer. Not anymore.

The majority of overdoses now stem from prescription opioids and heroin, according to data from the Centers for Disease Control and Prevention. That wasn’t always the case. In 1999, cocaine killed about twice as many people as heroin — 3,822 and 1,960 deaths, respectively — while opioids killed 4,030.

By 2014, opioid deaths were up 369 percent, while deaths from heroin jumped 439 percent, according to CDC data. That same year, cocaine deaths dropped below those caused by benzodiazepines, a class of drugs often used in sleeping pills or to combat anxiety.

Opioid prescriptions tripled over 20 years

One factor behind the surge in heroin and opioid use was the dramatic spike in the use of prescription painkillers.

In 1991, doctors wrote 76 million prescriptions. By 2011, that number had nearly tripled, to 219 million, according to a report from the National Institute on Drug Abuse. This rise was made all the more dangerous when drug cartels began flooding the United States with heroin, which was cheaper, more potent, and often easier to acquire than prescription pain meds. As the National Institute on Drug Abuse noted:

Mexican heroin production increased from an estimated 8 metric tons in 2005 to 50 metric tons in 2009 — more than a six-fold increase in just four years. Domination of the U.S. market by Mexican and Colombian heroin sources, along with technology transfer between these suppliers, has increased the availability of easily injectable, white powder heroin. In a recent survey of patients receiving treatment for opioid abuse, accessibility was one of the main factors identified in the decision to start using heroin.

As both heroin and prescription opioids became more common, so too did overdoses.

The epidemic has hit nearly everyone, regardless of race

Every racial demographic has seen more overdoses since 1999, with heroin spiking especially after 2010. Whites and Native Americans have experienced the largest rise in death rates, particularly when it comes to opioid-related fatalities. By 2014, whites and Native Americans were dying at double or triple the rates of African-Americans and Latinos, according to the CDC.

The New York Times found that “racial stereotypes” might be one explanation for the gap:

There is a reason that blacks appear to have been spared the worst of the narcotic epidemic, said Dr. Andrew Kolodny, a drug abuse expert. Studies have found that doctors are much more reluctant to prescribe painkillers to minority patients, worrying that they might sell them or become addicted.

But that doesn’t mean communities of color have escaped the epidemic. While media attention has often focused on the uptick of deaths among white, middle-class users, among African-Americans the death rate from heroin overdoses has gone up more than 200 percent since 2010. Among Latinos, it has climbed nearly 140 percent.

Heroin deaths skew younger. Opioid deaths come later.

Likewise, nearly every age group has been touched by the opioid epidemic. Heroin deaths skew younger, according to CDC data, while fatal opioid overdoses are more likely to happen in middle age.

Twelve states have more opioid prescriptions than people

Not every state has seen an equal rise in opioid use. In Hawaii, doctors wrote 52 opioid prescriptions for every 100 people in 2012, the least of any state according to a 2014 CDC study. In Alabama, it was almost 143 prescriptions per 100 people, more than anywhere else.

In all, 12 states had more opioid prescriptions than people 2012:

Alabama: 142.9 per 100 people

Tennessee: 142.8

West Virginia: 137.6

Kentucky: 128.4

Oklahoma: 127.8

Mississippi: 120.3

Louisiana: 118

Arkansas: 115.8

Indiana: 109.1

Michigan: 107

South Carolina: 101.8

Ohio: 100.1

The CDC study found no obvious geographic pattern to high levels of opioid prescriptions. If anything, researchers suspect that the variation shows a lack of consensus among doctors about how much pain medication to prescribe. Further, research shows that higher rates of prescription drug use don’t necessarily lead to better health outcomes or patient satisfaction.

“In fact, “the report says, “high rates of use might produce worse outcomes.”