Lawmakers, civil rights leaders and other officials took to Sunday-morning talk shows to condemn Saturday's slayings of two NYPD police officers in Brooklyn by a gunman who authorities say announced online that he was planning to shoot two "pigs" in retaliation for the chokehold death of Eric Garner.

Former New York City Police Commissioner Ray Kelly placed the blame on New York City Mayor Bill de Blasio for fanning the flames of antipolice anger during the protests earlier this month.

"I think when the mayor made statements about that he had to train his son — who is biracial — to be careful when he's dealing with the police, I think that set off this latest firestorm," Kelly said on ABC's “This Week with George Stephanopoulos." "And quite frankly, the mayor ran an antipolice campaign last year when he ran for mayor."

On CBS' "Face The Nation," Sen. Lindsey Graham said de Blasio had "undercut his cops" with his comments, but did not blame the mayor.

"I blame the shooter and nobody else," Graham said.

NAACP president Cornell Brooks said it's not fair to blame de Blasio or U.S. Attorney General Eric Holder, who launched federal investigations into the deaths of Garner and Michael Brown after local grand juries failed to indict the police officers involved those killings.

"We have a violence problem," Brooks said.

New York Rep. Gregory Meeks also dismissed criticism of the mayor and attorney general.

"They've been trying all along to bring the city together," Meeks said. "This heinous act is, as the mayor said, it tears away at the fabric of our society. And so we stand with the police department.... I think that the tone that the mayor is trying to set is a tone that brings people together."

At a press conference Saturday night at the hospital where the officers were pronounced dead, de Blasio strongly condemned the slayings.

“When a police officer is murdered, it tears at the foundation of our society,” the mayor said. “It is an attack on all of us. It’s an attack on everything we hold dear. We depend on our police to protect us against forces of criminality and evil. They are a foundation of our society, and when they are attacked, it is an attack on the very concept of decency.”

Story continues

At a separate press conference, Patrick Lynch, president of the Patrolmen's Benevolent Association, blasted the mayor.

"There is blood on many hands, from those that incited violence under the guise of protest to try to tear down what police officers do every day," Lynch said." That blood on the hands starts at the steps of City Hall, in the office of the mayor."

“I think it goes too far to blame the mayor for the murder or to ask for the mayor’s resignation," former New York City Mayor Rudy Giuliani said on Fox News. "But I don’t think it goes too far to say that the mayor did not properly police the protests.”

On NBC's "Meet The Press," Brooklyn Borough President Eric Adams said he understands the law enforcement community's criticism of the mayor.

"But this is not about one voice," Adams said. "This is about the voice of the entire city crying out for unity, crying out saying, 'How do we come together and deal with real issues in policing, and at the same time protect our officers?'

“Those who were calling for police reform were not calling for police retribution," he added. "They were not calling for harm to police. And we cannot allow someone to get in the way of moving towards police reform."

Giuliani criticized President Barack Obama for embracing the protests.

“We’ve had four months of propaganda starting with the president that everybody should hate the police,” Giuliani said. “The protests are being embraced, the protests are being encouraged. The protests, even the ones that don’t lead to violence, a lot of them lead to violence, all of them lead to a conclusion. The police are bad, the police are racist. That is completely wrong.”

New York Rep. Peter King agreed.

"It’s really time for our national leaders, the president, the mayor of New York and really for many in the media to stop the cop bashing, to stop this antipolice rhetoric,” King said on Fox News. “I mean, for the last four months, we’ve basically heard nothing other than the cops are guilty, presumed cops are guilty, then the grand jury says they’re not going to be indicted. People demonstrate, march in the streets, and it’s so slanted.”