CHICAGO (AP) — More people were shot to death in Chicago and surrounding Cook County in 2021 than in any other year on record, officials announced Monday, two days after authorities announced that the nation’s third-largest city recorded its most homicides in a quarter-century.

There were 1,002 gun-related homicides last year in Cook County, which includes Chicago and its surrounding suburbs, the county medical examiner’s office said in a news release. That was 121 more than the previous record set in 2020 and nearly twice as many as in 2019.

The announcement came two days after police in Chicago, where the vast majority of the county’s homicides occurred, reported that there were more homicides in the city, 797, than in any year since 1996. As in Chicago, where the vast majority of homicides involved guns, all but 85 of the 1,087 Cook County homicides were gun-related.

In both Chicago and the county overall, the vast majority of last year’s homicides happened in neighborhoods made up mostly of racial minorities. In Cook County, Black people were the victims of 80% of the homicides and Hispanic people were the victims in 14% of them.

The pandemic helped make 2021 the second-busiest year ever for the medical examiner’s office, with nearly 4,500 COVID-19 deaths contributing to the 12,618 cases it handled. Only 2020, when vaccines only rolled out in the final weeks of the pandemic’s first year, was busier, with the office handling more than 16,000 cases.

Opioids caused at least 1,488 deaths in Cook County last year, though the medical examiner’s office said it expects that such drugs also were responsible for an additional 600-700 of its pending cases. If so, that would put the final 2021 opioid death figure at more than 2,000, which would surpass the 1,840 registered in 2020, the office said.