New York City leaders tried to tamp down the strong emotions coursing through their city on Monday after the shooting deaths of two police officers, calling for unity and urging protesters to refrain from demonstrations until the officers are laid to rest.

In an emotional speech at a sometimes heated news conference, Mayor Bill de Blasio (D) declined to address the swirling controversy over whether his vocal efforts to reform the police department contributed to Saturday’s execution-style slaying of Officers Wenjian Liu and Rafael Ramos. Instead, de Blasio appealed for calm, visited the officers’ family members and urged residents to “put aside political debates and protests” for now.

City Police Commissioner William Bratton met with the heads of the city’s police unions, including one who had accused de Blasio of having “blood” on his hands for allegedly inciting protests that have roiled the city and the nation over the deaths of unarmed black people at the hands of police. “They are standing down in respect for our fallen members until after the funerals,” said Bratton, who also acknowledged that the mayor has “lost the trust of some officers.”

It was unclear whether the efforts to promote peace will succeed, even as New Yorkers busily prepared for the Christmas holidays. A coalition of protest groups released a statement blasting both Bratton and the police union, accusing them of trying to link the protests to the officers’ shootings as a way of silencing the demonstrations.

Calvin Butts, the influential pastor of New York’s Abyssinian Baptist Church, also objected to the call from both de Blasio and Bratton for protesters to stay home. “To say we ought to stop protesting really does not touch on the fact that not only are the families of the police officers grieving, the family of Eric Garner is grieving,” he told CNN, referring to the Staten Island man who died after a police officer put him in a chokehold while trying to arrest him. “The protests are a separate matter from this heinous crime that’s been committed against these New York City police officers.”

Here is a timeline tracking the events before two NYC police officers were shot earlier on Saturday.

With the recent events, de Blasio is confronting his most serious crisis since he was inaugurated early this year on a promise to take the city in a new, more liberal direction — an effort that has attracted national attention. In a city accustomed to larger-than-life leaders, de Blasio now appears isolated and adrift, as even his allies acknowledged Monday.

Liu and Ramos were shot Saturday as they sat in their patrol car in the Bedford-Stuyvesant neighborhood of Brooklyn. The alleged shooter, 28-year-old Ismaaiyl Brinsley, led other officers on a chase after the shootings into a subway station, where he was found with a gunshot wound that appeared to be self-inflicted, police said.

After examining several thousand images on Brinsley’s cellphone and on his Instagram account, authorities said Monday that it was clear that he hated police and the government, citing, for example, a Nov. 25 Instagram posting. “He goes on quite extensively about America and its inequities,” said Robert Boyce, the NYPD chief of detectives, who described the post as a “tirade.”

Authorities had previously said that just three hours before Saturday’s shootings, Brinsley had declared his intention on his Instagram account to kill police officers as retribution for the killings of Garner in New York and Michael Brown in Missouri. Protests erupted in recent weeks after the officers who shot and killed those two men were not charged with crimes.

For the first time, police said that the Brooklyn-born Brinsley had attended — and filmed on his cellphone — one of the recent New York City protests against police practices. They did not describe him as a participant.

Boyce cited other postings that talked about not only Brown but also Trayvon Martin, the 17-year-old African American from Florida whose 2012 shooting death at the hands of a former neighborhood watch volunteer also triggered widespread protests.

“We know that he was a very troubled young man,” Boyce said at an afternoon news conference. “He was enraged with police officers. That seemed to be the issue — anti-government, anti-police.’’

Police also revealed further details Monday of Brinsley’s violent interaction with his former girlfriend near Baltimore, hours before he killed the officers. They said Sunday that he probably used the same 9mm semiautomatic handgun to wound her that he later used to kill the officers. The former girlfriend, 29-year-old Shaneka Nicole Thompson, was shot about 5:45 a.m. in Owings Mills, Md., about 15 miles outside Baltimore.

According to police in both Baltimore County and New York City, Thompson told authorities in a brief interview Sunday that Brinsley unexpectedly showed up at her gated apartment community about 5:25 a.m. Saturday.

Police said Brinsley initially put his gun to his own head and Thompson talked him out of shooting himself. He later shot her during an argument about their relationship.

Thompson remains hospitalized in critical condition, police said, though she is expected to recover.

Funeral services will be held for Ramos on Friday in New York City. Police are working with Liu’s family to bring other family members to the United States from China before setting a funeral date.

Both funerals will be major public tests for New York’s embattled mayor.

John Catsimatidis, a billionaire supermarket mogul and longtime Bill Clinton donor, hosted de Blasio at a Police Athletic League luncheon in Manhattan on Monday. He said the mayor is still learning how to navigate New York City’s intricate maze of political players and interest groups.

“It’s not that he doesn’t want to do a good job,” Catsimatidis said in a phone interview. “It’s that he doesn’t know how to handle it.” He urged the mayor to seek advice from Clinton.

But Hank Sheinkopf, a veteran Democratic strategist who worked for de Blasio rival Bill Thompson, said it is unlikely that Bill and Hillary Clinton — both of whom attended de Blasio’s inaugural in January — will rally publicly to his side.

“They are going to wait and see how the environment appears in a week, several days, a month,” Sheinkopf said. “The problem with being the chief executive is you are the chief executive, and you stand very much . . . alone.”

De Blasio also risks being upstaged in the combative world of New York politics by Gov. Andrew M. Cuomo (D), who also visited Liu’s family Monday, notably before the mayor did.

“I’m going to make it my personal business today to bring the temperature down all across the board,” Cuomo said afterward. He appealed “for calm and peace and unity,” adding, “and then let’s have a productive conversation after the holidays.”

De Blasio revealed his emotions at a news conference Monday. After vowing not to be drawn into politics, he blasted the city’s media for what he called blowing the weeks of demonstrations out of proportion.

“You all are part of this, too,’’ he told reporters. “. . . What are you guys going to do? What are you going to do? Are you going to keep dividing us?”

Sean Sullivan, Robert Costa, Wesley Lowery and Peter Hermann contributed to this report.