This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

NEW YORK — Officials slammed recent protests against police in the wake of two ambush shootingsof officers in the Bronx.

An officer was shot in the chin and neck on Saturday and another officer was shot Sunday morning inside a police precinct. Just over a week ago, activists demonstrated against police. NYPD Commissioner Dermot Shea condemned the protests.

“Everyone should be speaking out against this, and you have to be careful about the words you use whether it’s on social media or on written papers or speaking because words matter and words affect people’s behavior,” he said. “And here we have New York City police officers, twice in 12 hours, targeted. And again, by the grace of God, that we’re not planning a funeral.”

Mayor Bill de Blasio agreed, noting that “anyone who spews hatred at our officers is aiding and abetting this kind of atmosphere.”

“You could protest for whatever you believe in but you cannot vilely attack those who are here to protect us,” he said. “It creates this kind of dynamic.”

They didn’t offer any evidence linking the gunman and the anti-police rhetoric from recent protests.

His leadership was criticized by President Donald Trump.

“I grew up in New York City and, over many years, got to watch how GREAT NYC’s “Finest” are,” Trump tweeted. “Now, because of weak leadership at Governor & Mayor, stand away (water thrown at them) regulations, and lack of support, our wonderful NYC police are under assault. Stop this now!”

Leadership at the Patrolmen’s Benevolent Association and the Sergeants Benevolent Association also connected disrespect against police with the shootings.

“The anti cop tone infecting our city & state is causing bloodshed,” the Sergeants Benevolent Association tweeted. “Before any public official sends their thoughts & prayers, they should ask themselves how the language & behavior they’ve been tolerating has contributed to violence against police.”

PBA President Pat Lynch said “hatred and violence” against police continues to grow.

“Good luck and kind words are not enough to keep police officers or the public safe,” he said. “Our elected officials need to start listening to us and working with us — not against us — to fix the deteriorating environment on our streets.”