By the time he took office in 2014, a federal lawsuit had led to a sharp decline in stop-and-frisk practices. But crime — instead of rising, as some critics warned — has continued to fall. Crime is now a central talking point for Mr. de Blasio as he runs for re-election, and it is often the first subject mentioned by the mayor, his aides and his campaign staff when providing a summary of his first term.

The decline in shootings and murders in 2016 contrasted most notably with Chicago, the nation’s third-largest city after New York and Los Angeles. Chicago ended the year with 762 murders, the most in two decades, and more than 3,500 shootings. While other large cities, such as Baltimore and Los Angeles, have had fluctuations in violence in recent years, New York crime rates have largely declined.

The Brooklyn setting for the news conference was a departure from the usual police precinct or headquarters to discuss crime statistics, but it underscored the changes in the city, as well as the challenges that remain. Brooklyn, the city’s most populous borough, with 2.6 million residents, saw the second-highest reduction in shootings after the Bronx, where overall crime barely budged. However, the 75th Precinct in East New York in Brooklyn led the city with 23 murders, followed by four precincts, in Brooklyn and the Bronx, that had 14 murders apiece.

In a charismatic speech, Eric L. Adams, the Brooklyn borough president, praised the anti-violence groups that have for years gone into some of the grittiest neighborhoods in the city, like Mr. Adams’s native Brownsville, to conduct outreach at candlelight vigils, on street corners, in hospitals and in public housing. But while crime in those communities has improved, gentrification in places like Crown Heights has made it difficult for longtime residents to stay to reap the benefits.

As they did all last year, officials on Wednesday credited the decline in shootings to the Police Department’s focus on the gangs and crews that it says are driving much of the violence. After restructuring its investigative units, the department carried out 107 targeted arrests that rounded up more than 1,000 suspected gang members, drug traffickers and their associates.

Many of the suspects were indicted before they were arrested, and they are receiving longer sentences when convicted, Commissioner O’Neill said.

“We’re picking them off one by one, or in many cases, dozens by dozens,” said Commissioner O’Neill, who succeeded William J. Bratton in the fall.