Fielding questions on Monday for the first time in two weeks, a virtually unheard-of gap for a modern mayoralty, Mr. de Blasio urged New Yorkers to focus on last year’s record-low crime rates and ignore “the loudest voices of disunity and discord.”

“Let’s talk about where we need to go as a city,” Mr. de Blasio told reporters gathered at 1 Police Plaza, with Police Commissioner William J. Bratton standing at his side. “The people want us all to come together. The people believe that we can do better.”

It was a very different mayor from the one who, during his last news conference on Dec. 22, had seemed visibly daunted by the deaths of the two officers and the outpouring of resentment from police union leaders, who accused him of fanning animosities against law enforcement.

By Monday, Mr. de Blasio and his aides had clearly made adjustments.

Gone was the uncertain mayor who lashed out in frustration at reporters. Instead, Mr. de Blasio stayed calm, repeatedly declared his appreciation for the Police Department and was unafraid to hit back at his critics. Asked about the funeral protests, he replied, sternly, “I can’t understand why anyone would do such a thing in a context like that.”

There were flashes of swagger. When Mr. de Blasio said he had been warned that the low crime rates of 2013 could not be matched — “and in fact it’s been beat handily” — his words carried an air of defiance.