Serious crimes in New York City declined in almost every category in 2016, setting new lows in shootings, burglaries and robberies, as well as near record drops in homicides, city officials said Wednesday. The only increase came in felonious assaults, a category which rose by 2.1 percent from 2015, according to NYPD data.

Mayor Bill de Blasio and NYPD Commissioner James O’Neill heralded the 2016 crime statistics at a special news conference at the Brooklyn Museum in conjunction with a photographic display depicting how certain city neighborhoods had physically changed over the years as they became safer.

“None of this happened by accident,” O’Neill told a crowd of Brooklyn community leaders, police officials and reporters. “We reduced the number of murders yet again, and the absolute lowest number of shootings in New York City since modern record keeping began.”

As reported in Newsday on Wednesday, homicides in 2016 dropped to 335 from 352 in the prior year, while shootings dipped to 998, the first time the city had less than 1,000 shootings. Overall serious felonies dropped about 4 percent to 101,600, compared with 105,921 in 2015, said Chief Dermot Shea.

O’Neill said that the new community policing model, which forces police officers to have closer contact with neighborhoods, has helped develop crime-fighting intelligence and is beginning to mend strained relationships between the NYPD and civilians. O’Neill and others acknowledged police videos and some media reports lead to a perception there is more crime.

Focused attention on gangs and violent offenders is something O’Neill says will continue to drive crime downward.

“We are picking them off one by one,” said O’Neill about the gang members.

New York’s homicide statistics for 2016 place it near the bottom in terms of the rate for each 100,000 population among U.S. cities with more than 1 million residents. Only San Diego did better. Bloodshed in Chicago accounted for 762 killings last year, the most of any U.S. city.

Patrolmen’s Benevolent Association president Patrick Lynch said in a statement it is time for the city to recognize the work police officers do by raising their salaries. The PBA, which is in mediation over salaries, provided data which showed Chicago police have a basic maximum salary of $127,432, compared with $78,025 in New York.