A union representing thousands of active and retired New York City police sergeants said Sunday that it was “declaring war” on the city’s mayor Bill de Blasio.

The shocking statement came in a tweet from the NYPD Sergeants Benevolent Association, after a gunman allegedly shot and wounded two police officers over two days in New York — and despite de Blasio’s sharp denunciation of the attacks.

Mayor DeBlasio, the members of the NYPD are declaring war on you! We do not respect you, DO NOT visit us in hospitals. You sold the NYPD to the vile creatures, the 1% who hate cops but vote for you. NYPD cops have been assassinated because of you. This isn’t over, Game on! https://t.co/XyruPraM9T — SBA (@SBANYPD) February 9, 2020

De Blasio spokesperson Freddi Goldstein told TPM, referring to the tweet: “[SBA President] Ed Mullins’ comments are absolutely reprehensible. He clearly has forgotten his oath to protect and serve. While he threatens violence, the mayor remains focused on the safety of our officers and communities.”

The tweet is part of a larger effort from police unions to tie de Blasio’s lefty politics to explicitly anti-cop protest movements.

“We talk about the protesters that are yelling ‘We want dead cops!’” New York City Police Benevolent Association President Pat Lynch said Sunday. “Those words meant something and people listen and they try to kill cops.”

“But who’s leading them? Some of the elected officials that stand here today nodding their heads when we speak are the ones that’s leading those crowds, leading those demonstrators, putting the words in those protesters’ mouths!” he said. “Well, now it’s real.”

The tension between de Blasio and the police unions goes back years to his time as a social justice-minded city councilman and public advocate. Police anger spiked after Officer Daniel Pantaleo, on July 17, 2014, put Eric Garner in a fatal chokehold. Garner’s death rocked the city, not least when De Blasio invited Rev. Al Sharpton to speak at a meeting at City Hall, where the civil rights leader called for consequences for the police officers involved as then-Police Commissioner Bill Bratton stared on two seats away.

Months later, when two police officers were killed in an ambush shooting, NYPD officers publicly turned their backs to de Blasio as he arrived at the hospital, and again a few days later when the mayor spoke at one of the officers’ funerals. The SBA said at the time that the slain officers’ blood was on the mayor’s hands.

Since then, the police union campaign against New York’s mayor has linked with the national movement to quell criticism of police — articulated in public displays like the #BlueLivesMatter hashtag and President Donald Trump’s 2017 suggestion to New York police officers to “take the hand away” from arrestees’ heads as they enter police cars while handcuffed. “Please don’t be too nice,” Trump told the officers seated behind him during a speech in Brentwood, New York.

On Sunday, Trump commented on the recent attacks against police officers in New York, tweeting that “because of weak leadership at Governor & Mayor,” New York’s police were “under assault.”

“Send in the Feds,” the SBA tweeted in response.

President Trump is 100% correct. NYS & NYC need the support of the Department of Justice. Criminals are being released, it’s time we prosecute in Federal Court. The Mayor is ruining NYC, cops have been stopped from doing their jobs. NYC is under siege. Send in the Feds https://t.co/OuOtwG5h7H — SBA (@SBANYPD) February 9, 2020

Neither the PBA nor the SBA has responded to TPM’s request for comment to more fully explain their criticisms of the mayor.

But the unions’ attacks on de Blasio fit with the larger trends in conservative politics.

Consider SBA’s claim that de Blasio had “sold the NYPD to the vile creatures, the 1% who hate cops but vote for you.”

Less than two weeks before expressing the anti-elite sentiment, the SBA account wondered whether George Soros — the wealthy, progressive Jewish donor and constant victim of anti-Semitic conspiracy theories — was guilty of “treason?”

And on Sunday, the union retweeted the prominent Trump supporter and prolific Twitter presence James Woods, who said de Blasio had done more to incite anti-police violence “than anyone in history.”

“No punches pulled,” the actor said. “A shocking indictment of #CopHaterDeBlasio.”

This post has been updated.