A police union leader's anger boiled over Saturday night as he linked the execution-style slayings of two officers to weeks of protests over NYPD conduct and Mayor Bill de Blasio's efforts to assuage police critics. Protest leaders and public officials strongly condemned the killings, and de Blasio said the murder of cops "tears at the foundations of our society."

Patrick J. Lynch, president of the Patrolmen's Benevolent Association, charged that de Blasio and the protesters bore blame for an atmosphere of hostility to cops.

"There's blood on many hands tonight," Lynch said at a news conference outside Woodhull Medical Center after ambulances carried away the bodies of Officers Rafael Ramos and Wenjian Liu.

"Those that incited violence on the street in the guise of protest, that tried to tear down what New York City police officers did every day. We tried to warn it must not go on, it shouldn't be tolerated. That blood on the hands starts at the steps of City Hall in the office of the mayor."

Tensions between de Blasio and police unions have steadily worsened since a grand jury decided not to issue an indictment for the July death of Eric Garner on Staten Island after an officer arresting him for a petty offense placed him in an apparent chokehold. The PBA accused de Blasio of failing to show support for cops, and the PBA sent a flier to its members urging them to sign a form letter telling him to stay away from their funerals if they were killed in the line of duty.

Lynch did not take questions after his comments Saturday night and it was unclear whether there would be any effort to bar de Blasio from the two slain officers' funerals.

The disinvitation letter also applied to City Council Speaker Melissa Mark-Viverito.The suspect, Ismaaiyl Brinsley, in a cop-killing vow posted on Instagram, cited the cases of Garner and Michael Brown in Ferguson, Missouri.

Sign up to get the latest updates Get Newsday's Breaking News alerts in your inbox. By clicking Sign up, you agree to our privacy policy.

"Any use of the names of Eric Garner and Michael Brown, in connection with any violence or killing of police, is reprehensible and against the pursuit of justice in both cases," the Rev. Al Sharpton, president of the National Action Network, said in a statement.

A Staten Island grand jury's decision Dec. 3 not to indict Daniel Pantaleo in the death of Garner set off weeks of street protests, including a march in Manhattan Dec. 13 by about 30,000 people. Sharpton said he has stressed at rallies and marches that "anyone engaged in any violence is an enemy to the pursuit of justice for Eric Garner and Michael Brown."

The Justice League, which has organized some of the protests over Garner's death and met with de Blasio Friday to press its demands, said in a tweet the organization was "deeply saddened by the murders today in Brooklyn."

"Any act of violence is a crime against humanity," the group said.

President Barack Obama, in a statement issued while he’s vacationing in Hawaii, said he unconditionally condemns the slayings, the Associated Press reported.

“The officers who serve and protect our communities risk their own safety for ours every single day — and they deserve our respect and gratitude every single day,” Obama said. “Tonight, I ask people to reject violence and words that harm, and turn to words that heal — prayer, patient dialogue, and sympathy for the friends and family of the fallen.”

With Emily Ngo