The number of drug overdose deaths in the US was so high in 2017 that it contributed to a drop in life expectancy.

According to new data from the Centers for Disease Control and Prevention, there were more than 70,000 drug overdose deaths in 2017 — the highest number of drug overdose deaths for any single year in US history. The age-adjusted overdose death rate, of 21.7 per 100,000 people, was nearly 10 percent higher than it was in 2016, the CDC found.

The worst states for drug overdose deaths in 2017: West Virginia (57.8 per 100,000 people), Ohio (46.3), and Pennsylvania (44.3).

The leading cause of overdose deaths was non-methadone synthetic opioids, primarily fentanyls that have increasingly supplanted heroin in the illicit market.

The CDC blamed the increase in drug overdose deaths, as well as a continuing increase in suicides, for a drop in life expectancy in 2017, making that year the third in a row in which life expectancy fell or remained flat.

Preliminary numbers for 2018 indicate that the overdose death rate may have leveled off earlier in the year, although that would still leave drug overdose deaths at record or near-record rates.

The opioid epidemic began in the 1990s, when pharmaceutical marketing and lobbying led doctors to prescribe far more opioid painkillers — leading to a first wave of overdose deaths as more people, including both patients and people who stole or bought painkillers from patients, misused the drugs and got addicted.

A second wave of drug overdoses took off in the 2000s when heroin flooded the illicit market, as drug dealers took advantage of a new population of people who used opioids but either lost access to painkillers or simply sought a better, cheaper high. And now the US is in the middle of a third wave, as fentanyls offer an even more potent, cheaper — and deadlier — alternative to heroin.

There are real solutions to the opioid crisis

Public health and drug policy experts say there are solutions to the crisis. First, America could dramatically expand access to addiction treatment — which, based on a 2016 surgeon general report, remains inaccessible to the bulk of people who need it. That should entail dramatically boosting access to medications like methadone and buprenorphine, which are considered the gold standard of treatment for opioid addiction and reduce the mortality rate among opioid addiction patients by half or more.

When France relaxed restrictions on doctors prescribing buprenorphine in response to its own opioid crisis in 1995, the number of people in treatment rose and overdose deaths fell by 79 percent over the following four years.

Beyond treatment, prescribers could also cut back on excess opioid painkiller prescriptions — to prevent more people from misusing the drugs, while still ensuring patients who truly need them get access. Harm reduction approaches, such as needle exchanges and more distribution of the opioid overdose antidote naloxone, would also help.

Several of the states that, based on preliminary CDC data, saw overdose deaths drop or level off in 2017 took these kinds of steps.

Vermont saw its overdose death rate drop by nearly 7 percent last year with the continued expansion of a hub and spoke system that integrates addiction treatment into the rest of health care. Rhode Island also saw a more than 3 percent drop, as it implemented, among other changes, better access to opioid addiction medications in its prisons and jails. And Massachusetts saw a roughly 1 percent drop, along with a public health campaign that has emphasized more treatment and fewer painkiller prescriptions.

These are by no means huge decreases. But they are significant because they’re in states in New England — which has been among the hardest hit by the opioid crisis, and has seen overdose deaths consistently increase in recent years. Public health interventions can also take time to take root, as more and more of the public learns the risks of addiction and that treatment is really available now.

A consistent problem for many states has been a lack of federal resources. Congress has increased funding for opioid addiction treatment here and there in recent years, but the money allocated so far falls very short of the tens of billions of dollars that experts say is necessary to fully and quickly confront the opioid epidemic. And despite lavish promises, President Donald Trump has done little to change that.

For more on the solutions to the opioid epidemic, read Vox’s explainer.

Correction: This article originally indicated that 2017 was the third year in a row in which life expectancy fell. After the CDC revised its 2016 numbers, life expectancy actually remained flat in 2016, contrary to what the CDC previously reported. So 2017 was the third year in a row in which life expectancy remained flat or fell.