Yet overdose deaths for young adult blacks have edged up only slightly. Over all, the death rate for blacks has been steadily falling, largely driven by a decline in deaths from AIDS. The result is that a once yawning gap between death rates for blacks and whites has shrunk by two-thirds.

“This is the smallest proportional and absolute gap in mortality between blacks and whites at these ages for more than a century,” Dr. Skinner said. If the past decade’s trends continue, even without any further progress in AIDS mortality, rates for blacks and whites will be equal in nine years, he said.

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.

“The answer is that racial stereotypes are protecting these patients from the addiction epidemic,” said Dr. Kolodny, a senior scientist at the Heller School for Social Policy and Management at Brandeis University and chief medical officer for Phoenix House Foundation, a national drug and alcohol treatment company.

Not many young people die of any cause. In 2014, there were about 29,000 deaths out of a population of about 25 million whites in the 25-to-34 age group. That number had steadily increased since 2004, rising by about 5,500 — about 24 percent — while the population of the group as a whole rose only 5 percent. In 2004, there were 2,888 deaths from overdoses in that group; in 2014, the number totaled 7,558.

Mortality rates, said Mark D. Hayward, a professor of sociology at the University of Texas at Austin, are one of the most sensitive measures of quality of life.