The president of the NYPD detectives union said on Thursday that the government is stopping the police from doing their job amid the riots that broke out during the protests over George Floyd's death.

“It’s not the police department. We know what we have to do and how we have to do it. We just need the OK to go,” said Paul DiGiacomo on  “Fox & Friends.”

The president of the Detectives' Endowment Association said that the chaos could be stopped in a couple of hours.

“They know how to confine the criminals and keep the peaceful protesters marching. We’ve done it before hundreds of times,” DiGiacomo said.

TRUMP SIGNS SOCIAL MEDIA EXECUTIVE ORDER THAT CALLS FOR REMOVAL OF LIABILITY PROTECTIONS OVER 'CENSORING'

New York City police officer was randomly attacked and stabbed in the neck late Wednesday while patrolling in Brooklyn, which resulted in a struggle that caused two additional officers to suffer gunshot wounds.

Police said at an early news conference Thursday that a preliminary investigation indicated a male suspect walked up to the officers casually and whipped out the knife. They said the officers involved had been assigned to an anti-looting post to prevent people from breaking into stores.

Two additional officers were struck in the hand by gunfire during the incident, police said. They were rushed to Kings County Hospital and are expected to survive.

Nearby officers later heard the gunshots and responded to find the suspect brandishing a gun, which police said was likely taken from an officer. The suspect was shot multiple times at the scene later described by Shea as "chaotic." He added that 22 shell casings were recovered following the incident.

CLICK HERE FOR THE FOX NEWS APP

DiGiacomo said that it is the government’s fault the police have to fix a broken justice system and blasted the state's “no-bail” laws that allow criminals to quickly be released back on the streets.

“They create these laws and these people go out and victimize the properties and the people of this city. They get arrested and it is like a revolving door. They create the laws and then they blame the police,” DiGiacomo said.

“They have to fix what is wrong with society and fix what is wrong regarding the justice system and that is not letting violent criminals out to commit more crimes against the good people in our city.”