A New York City judge is under fire after freeing without bail a man police say tried to steal an officer's gun--just days after the assassination of a Bronx cop.

Cops say Kurdel Emmanuel, a mentally-troubled 29-year-old man, tried Saturday to wrestle the gun from a female officer who fought him off in a Brooklyn precinct house.

WNBC-TV reported that when Emmanuel was interviewed after his arrest he told police he wanted to kill a cop.

On Sunday, Emmanuel appeared before Brooklyn Judge Loren Baily-Schiffman on assault, attempted robbery and attempted criminal possession of a weapon charges.

Prosecutors requested a $250,000 bond. Instead, Baily-Schiffman released him on his own recognizance.

Her decision outraged police union leaders, according to reports.

They pointed out that Bronx officer Miosotis Familia was killed in an ambush Wednesday. The gunman was another mentally troubled man who said he wanted to go after cops. That man Alexander Bonds was killed fleeing 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 wrest the gun away from the officer.

Emmanuel was home with his stepmother Sunday after the arraignment, the paper reported.

“He has mental-health issues,” the woman said, according to the paper. “The problem you have is you have someone who is not well, and you can still get conflicting stories.”

The judge declined comment to WNBC and hung up on a Post reporter.

It wasn't clear why Baily-Schiffman was handling criminal arraignments.

She normally hears lawsuits not criminal matters, according to NYC Office of Court Administration records.

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.