Detroit is on track to record the fewest murders since the 1960s. In Philadelphia, where there were more murders in 2021 than in any year on record, the number of homicides this year has fallen more than 20 percent from last year. And in Los Angeles, the number of shooting victims this year is down more than 200 from two years ago.

The decrease in gun violence in 2023 has been a welcome trend for communities around the country, though even as the number of homicides and the number of shootings have fallen nationwide, they remain higher than on the eve of the pandemic.

In 2020, as the pandemic took hold and protests convulsed the nation after the murder of George Floyd by a police officer in Minneapolis, the United States saw the largest increase in murders ever recorded. Now, as 2023 comes to a close, the country is likely to see one of the largest — if not the largest — yearly declines in homicides, according to recent F.B.I. data and statistics collected by independent criminologists and researchers.

The rapid decline in homicides isn’t the only story. Among nine violent and property crime categories tracked by the F.B.I., the only figure that is up over the first three quarters of this year is motor vehicle theft. The data, which covers about 80 percent of the U.S. population, is the first quarterly report in three years from the F.B.I., which typically takes many months to release crime data.

The decline in crime contrasts with perceptions, driven in part by social media videos of flash-mob-style shoplifting incidents, that urban downtowns are out of control. While figures in some categories of crime are still higher than they were before the pandemic, crime overall is falling nationwide, including in cities often singled out by politicians as plagued by danger and violence. Homicides are down by 13 percent in Chicago and by 11 percent in New York, where shootings are down by 25 percent — two cities that former President Donald J. Trump called “crime dens” in a campaign speech this year.

Just as criminologists attributed the surge in murders in 2020 and 2021 to the disruptions of the pandemic and protests — including the isolation, the closing of schools and social programs and the deepening distrust of the police — they attribute the recent drop in crime to the pandemic’s sliding into the rearview mirror.

“Murder didn’t go up because of things that happened in individual neighborhoods or individual streets,” said Jeff Asher, a crime analyst based in New Orleans who tracks homicides in nearly 180 American cities. “It went up because of these big national factors, and I think the big national factors are probably driving it down. The biggest of which is probably Covid going to the background.”

In a country awash in guns, the normal that many cities are returning to is still a violent one, with the biggest still enduring hundreds of fatal shootings a year. And some cities are bucking the positive trend, including Washington, where the murder toll continues a grim multiyear climb. The homicide tally this year is the highest in two decades, and there have been more than 900 carjacking incidents.

Washington is an exception this year even in the Mid-Atlantic region. Baltimore is on track to report the fewest murders in nearly a decade, and Philadelphia to post a homicide count more than 25 percent below its 2021 record of 562.

Several community activists in Philadelphia attributed the surge of violence in recent years to the sudden vacuum of civic resources at the onset of the pandemic. “We got to see what happens when there are no programs available,” said Jonathan Wilson, who runs the Fathership Foundation, a nonprofit in southwest Philadelphia.

Schools, recreation centers and libraries were closed, and grass-roots groups like his were not equipped to fill the gaps. But the city’s budget last year included more than $150 million for anti-violence efforts, some of it in the form of grants to organizations that could match teenagers with jobs or provide safe places for students after school.

The city of Detroit is on track to record the lowest number of homicides since 1966, a remarkable milestone even given its substantially smaller population today. Local officials credited an aggressive effort to jump-start the criminal justice system, which had largely stalled in the pandemic.

“We know why violent crime soared in America,” said Mayor Mike Duggan at a news conference this month. “The criminal courts shut down. You couldn’t put 12 jurors in a room.”

Chief Michel Moore of the Los Angeles Police Department said that while he was encouraged to see such steady declines in violent crime — murder and rape are down markedly and robbery is down slightly this year — the city was struggling with property crime. Burglaries, car thefts and personal theft are all up substantially.

In Los Angeles, much of the decline in murders comes from a drop in the number of killings of homeless people; in both 2021 and 2022, more than 90 homeless people were killed, according to Crosstown, a nonprofit news outlet. So far this year, 35 fewer homeless people have been killed, a 55 percent reduction, according to Chief Moore. While the trend is encouraging, he said, violence in L.A., like in many cities, is still up compared with just before the pandemic.

“We still have far too much violence and we have more work to do when we look at the pre-Covid period,” he said.

Chelsia Rose Marcius contributed reporting.