The NYPD is on the warpath over a judge releasing a man after he attacked a female officer in an attempt to steal her gun at a Brooklyn precinct because he wanted to “kill a cop.”

Kurdel Emmanuel, 29, was at the 83rd Precinct in Brooklyn Saturday to ask about the status of a friend who had been arrested. At that time, he allegedly attacked a female officer, grabbed onto her belt, and fought with her as he tried to remove her gun from its holster. He was overtaken and arrested.

When interrogated about the incident after his arrest, Emmanual allegedly said he tried to take the gun because he wanted to kill a cop.

He was charged with assault, attempted robbery, and attempted criminal possession of a weapon.

Emmanual appeared before Brooklyn Judge Loren Baily-Schiffman on Sunday when prosecutors requested a $250,000 bond. Instead, Baily-Schiffman released the man on his own recognizance.

Her decision outraged a city still mourning the loss of Bronx officer Miosotis Familia who was assassinated in a command center vehicle Wednesday after being ambushed by Alexander Bonds, a mentally ill man who allegedly said he wanted to kill cops. Bonds was killed as he fled the scene after the shooting.

“This is a sickening display of carelessness or callousness by a judge who should be fully aware of the similarity in the circumstances between this thug’s crime and the assassination of police officer Miosotis Familia,” Patrolmen’s Benevolent Association president Patrick Lynch, said, according to WPIX-TV. “We have seen too often the unbalanced act out against NYC police officers with deadly effect.”

Ed Mullins, who represents NYPD sergeants, told the New York Post that Emmanuel would have “killed police officers” if he managed to wrestle the gun away from the officer.

Dennis Quirk, president of the New York State Court Officers Association, declared, “This idiot should be removed from the bench.”

The judge has declined all requests for comment.

According to NYC Office of Court Administration records, Baily-Schiffman normally hears lawsuits and not criminal matters, so it isn’t clear why she was handling criminal arraignments. She is now listed as an acting Supreme Court Justice but for many years was on the bench in civil court where legal disputes involving less than $25,000 are heard.

The NYPD sent an alert out to all officers.