Drug overdoses killed roughly 64,000 people in the United States last year, according to the first governmental account of nationwide drug deaths to cover all of 2016. It’s a staggering rise of more than 22 percent over the 52,404 drug deaths recorded the previous year — and even higher than The New York Times’s estimate in June, which was based on earlier preliminary data.

Drug overdoses are expected to remain the leading cause of death for Americans under 50, as synthetic opioids — primarily fentanyl and its analogues — continue to push the death count higher. Drug deaths involving fentanyl more than doubled from 2015 to 2016, accompanied by an upturn in deaths involving cocaine and methamphetamine. Together they add up to an epidemic of drug overdoses that is killing people at a faster rate than the H.I.V. epidemic at its peak.

Drugs involved in U.S. overdose deaths, 2000 to 2016 Note: Data for 2016 is provisional.

This is the first national data to break down the growth by drug and by state. We’ve known for a while that fentanyls were behind the growing count of drug deaths in some states and counties. But now we can see the extent to which this is true nationally, as deaths involving synthetic opioids, mostly fentanyls, have risen to more than 20,000 from 3,000 in just three years.

Total U.S. drug deaths

Deaths involving prescription opioids continue to rise, but many of those deaths also involved heroin, fentanyl or a fentanyl analogue. There is a downward trend in deaths from prescription opioids alone. At the same time, there has been a resurgence in cocaine and methamphetamine deaths. Many of these also involve opioids, but a significant portion of drug deaths — roughly one-third in 2015 — do not.

The explosion in fentanyl deaths and the persistence of widespread opioid addiction have swamped local and state resources. Communities say their budgets are being strained by the additional needs — for increased police and medical care, for widespread naloxone distribution and for a stronger foster care system that can handle the swelling number of neglected or orphaned children.

Drug overdose deaths per 100,000 residents in 2015 and 2016 Of the 21 states that reported the highest quality data for 2016, the steepest rises were in Delaware, Florida and Maryland. Note: Deaths were coded based on where the death occurred rather than residency.

It’s an epidemic hitting different parts of the country in different ways. People are accustomed to thinking of the opioid crisis as a rural white problem, with accounts of Appalachian despair and the plight of New England heroin addicts. But fentanyls are changing the equation: The death rate in Maryland last year outpaced that in both Kentucky and Maine.

This provisional data, compiled by the National Center for Health Statistics, was produced in response to requests from government officials after reporting from The Times in June. An early version of the report was posted online last month and will be formally published by the N.C.H.S. in the coming weeks. According to Robert Anderson, the agency’s chief of mortality statistics, the document is the first edition of what will be a monthly report on the latest provisional overdose death counts.

Because of delays in drug death reporting, the data is mostly but not entirely complete. The final numbers, released in December, could be even higher.