At a time when U.S. cities such as Chicago and Philadelphia have been plagued by violence, New York City reported its safest year ever.

Overall crimes in the most populous U.S. city reached a record low of 101,606 in 2016 — a drop of 4 percent from last year and 76 percent since 1993, according to New York Police Department statistics released Wednesday.

New York's rate of 4 homicides per 100,000 of population compares to about 18 per 100,000 in Chicago and Philadelphia, according to NYPD data. Chicago law enforcement officials visited New York two weeks ago to study the department's organization and techniques, Police Commissioner James O'Neill said during a news conference Wednesday.

The success appears to contradict President-elect Donald Trump's repeated attacks on New York's crime-fighting strategies. Trump has said the nation's urban areas are unsafe and would benefit from an increase in police stop-and-frisk confrontations.

Mayor Bill de Blasio, a Democrat who has stressed better relationships between police and minorities, said the city's steep crime drop coincided with a 93 percent decrease in the use of such tactics.

"President Trump is wrong about stop-and-frisk, I told him that to his face," de Blasio said at the news conference. "The way forward for all American police forces is to deepen communications with the local community."

De Blasio added 1,300 police officers beginning in 2015, bringing the total to about 35,000. The department also has benefited from an upgrade of technology, including the use of Compstat, a crime-mapping system, and a "Real Time Crime Center" that has much of the city's streets and transit system under 24-hour surveillance.

Strategically, the department's detectives have collected information focusing upon a relatively small number of problem individuals and gangs, preventing some crimes through counseling interventions, warnings and surveillance, O'Neill said.

New York reported 998 shootings in 2016, a 12 percent drop from 2015, and the first time in modern history that the city had recorded fewer than 1,100. Its 335 homicides came close to the recorded low of 333, set in 2014.

Just this week, Trump criticized Chicago Mayor Rahm Emanuel — Obama's former chief of staff — for that city's record murder rate in 2016. "If Mayor can't do it he must ask for Federal help!" Trump posted on Twitter on Jan. 2.

In September, Trump decried "a lack of spirit" and "unity" that he said caused tension between black and white Americans, and he called for the widespread use of stop-and-frisk tactics, encounters that civil-liberties groups have criticized as ineffective and discriminatory when used disproportionately against minorities.

"We did it in New York, it worked incredibly well," Trump said in September during an interview with Fox News, describing a period five years ago when almost 700,000 street-encounters occurred between police and mostly minority youth.

De Blasio countered that Trump had no expertise or experience with police practices.

"On this issue he has no legitimacy," the mayor said then. "Back then we had to prove we could make the city safe without stop-and-frisk, and we've proven that."