Bill de Blasio has demanded 'consequences' for a New York police union head after an incendiary tweet 'declaring war' on the mayor.

Sergeants Benevolent Association (SBA) president Ed Mullins launched an attack on de Blasio after an officer was shot inside a patrol van Saturday night and another outside a Bronx police station the following morning.

'Mayor DeBlasio, the members of the NYPD are declaring war on you!' Mullins tweeted. '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!'

De Blasio told reporters he was 'disgusted' by the comments, adding that 'there should be consequences for that kind of speech. I think it's destructive.'

New York Mayor Bill de Blasio (pictured in Washington last month) told reporters he was 'disgusted' by the comments of Sergeants Benevolent Association (SBA) president Ed Mullins

A tweet by Ed Mullins, president of the Sergeants Benevolent Association, 'declaring war' on de Blasio. The New York mayor called the words 'destructive'

NYPD Commissioner Dermot Shea also rebuked the union boss. 'When you see a tweet like that, I think it’s wrong. I think Ed Mullins should think before he tweets something like that because it’s not helpful,' Shea said.

Freddi Goldstein, the mayor's spokeswoman, called the comments 'absolutely reprehensible.'

The SBA has been angered by de Blasio's limiting of stop-and-frisk powers, his plans to close the jail on Rikers Island and declaring New York a sanctuary city.

Sergeants Benevolent Association president Ed Mullins launched an attack on de Blasio after an officer was shot inside a patrol van Saturday night and another outside a Bronx police station the following morning

It comes as Robert Williams, 45, was arraigned Monday on attempted murder and other charges after a weekend of terror launched on police.

The shootings have led to recriminations from police officials and union leaders who criticized recent demonstrations as creating an 'anti-police' atmosphere as well as pushback to that characterization from police reform advocates who said making that connection was irresponsible.

Williams, of the Bronx, is accused of approaching a police patrol van on Saturday night and firing at two officers inside, wounding one before escaping on foot, and also of opening fire Sunday morning at the 41st precinct headquarters, where he wounded a police lieutenant before being arrested.

Under the watching eyes of the police officers who packed a Bronx courtroom, Williams made his first appearance following his Sunday arrest, wearing a gray sweatshirt and sweatpants, one eye swollen shut and a bandage on his ear.

Just before Williams was arraigned, it was revealed that he had been arrested in 2018 for driving driving while intoxicated. At the time of that arrest, Williams allegedly tried to resist, prompting officers to use a stun gun on him.

Robert Williams (pictured in court on Monday), 45, who allegedly shot two NYPD cops has been arraigned in a Bronx court as it's revealed he was 'angry' at police for using a stun gun on him during a 2018 arrest

Following his arrest, he was hospitalized and from his hospital bed, Williams is said to have made several rambling statements. According to News 4, Williams expressed his anger at police in general before mentioning the DWI arrest.

Williams allegedly voiced anger about being stunned and labeled an emotionally disturbed person by the officers who arrested him at the time.

After the 2018 arrest, Williams went back to prison on a parole violation for two months from December 2018 to January 2019.

While in custody, Williams reportedly told officers at the hospital that he was going to shoot one of them once he gets out.

'I'm going to shoot one of you when I get out,' Williams said, according to the New York Post.

Following the arraignment Patrick Lynch (pictured speaking), the president of the Patrolmen's Benevolent Association of New York City, condemned the shootings outside the court

Williams was remanded into custody after his appearance on Monday and is due back in court on February 14.

He was represented in court by an attorney from The Bronx Defenders.

'There is still much that we don't know about what happened and what led up to this incident,' attorney Tom Klein said in a statement.

'We look forward to investigating and learning more so that we can best represent Mr. Williams.'

Earlier Monday, Lt. Jose Gautreaux, who was wounded at the 41st precinct, was greeted by lines of waiting officers as he left the hospital.

His arm in a sling and a police jacket over his shoulders, Gautreaux got out of a wheelchair at the hospital entrance, walking to a waiting car and giving the crowd a thumbs-up. Among those there was NYPD Commissioner Shea.

The officer who was wounded in that earlier attack, Paul Stroffolino, was released from the hospital on Sunday evening.

Lt Jose Gautreaux, who was wounded on Sunday morning at the 41st precinct headquarters in the Bronx, was released from the hospital earlier on Monday

Police said Williams had a long criminal history, including a 2002 shooting and carjacking in which he fired a gun at police. He was paroled from prison in 2017.

Shea has been vocal in condemning criminal justice reform activists for engaging in protests that he suggested have been part of creating what he called an anti-police environment.

'These things are not unrelated. We had people marching through the streets of New York City recently,' Shea said Sunday. 'Words matter. And words affect people's behavior.'