A heroin crisis gripping communities across the country deepened in New York last year, with more people in the city dying in overdoses from the drug than in any year since 2003.

In all, 420 people fatally overdosed on heroin in 2013 out of a total of 782 drug overdoses, rising to a level not seen in a decade in both absolute numbers and as a population-adjusted rate, according to preliminary year-end data from the city’s health department.

The death toll from heroin has more than doubled over the last three years, presenting a growing challenge to city officials who have so far been unable to reverse the rise. By contrast, amid a concerted effort to stem prescription pill abuse, especially on Staten Island, overdoses from opioid pills leveled off during the same time period, with 215 deaths recorded in 2013.

The data, to be released on Thursday, track the spread of heroin into new areas of the city, hitting hardest among white and higher-income New Yorkers but also spiking with older Hispanic users in the Bronx.