NEW YORK (CBSNewYork) — Tyrone Howard, 31, who allegedly shot NYPD Officer Randolph Holder last month, was sentenced to 12 years in prison by the same judge who spared him in a plea deal earlier this year.

Howard was given the maximum sentence under charges in an unrelated drug case.

READ MORE: Valanciunas, Hart Lead Pelicans Past Knicks

“Yesterday you received mercy, today you receive justice,” Manhattan Supreme Court Justice Patricia Nunez said.

Nunez lashed out at Mayor Bill de Blasio and Police Commissioner Bill Bratton in the courtroom, saying that she and the rest of the judicial system should not be scapegoated for what happened to Howard, 1010 WINS’ Juilet Papa reported.

“I want to correct what has been a false narrative, in some ways, that was presented in the press,” Nunez said. “It was begun by the mayor of the City of New York and his police commissioner, who made statements without checking the facts.”

Nunez was placed under scrutiny because of a decision she made to place Howard in a court-sanctioned drug rehabilitation program as part of a plea deal earlier this year. 

Mayor Bill de Blasio said the courts should never have allowed him back on the streets.

READ MORE: New York Weather: CBS2’s 1/21 Friday Morning Forecast

Nunez said based on the record presented to her, Howard was eligible for the diversion program.

Nunez said the drug rehabilitation program are the types of initiatives politicians want, and told de Blasio to ‘look in the mirror’ and think about the policies he supports.

“And I would suggest that the mayor look into a mirror and ask himself whether or not it’s his own policies that he’s in favor of, whether or not those policies actually make somebody actually feel he can shoot a cop,” Nunez said. “Do not blame the judges.”

City Hall spokesman Karen Hinton said in a statement that Nunez’ remarks were “entirely irresponsible,” CBS2’s Marcia Kramer reported.

“Judge Nunez owes Commissioner Bratton an apology. Our Police Commissioner has done more to reduce crime in this city than anyone in recent history,” Hinton said in a statement.

MORE NEWS: Armed Suspect Dies After Police-Involved Shooting In Williamsbridge Section Of Bronx

Howard is charged with shooting Officer Holder in the head in East Harlem in October. He is due back in court on Nov. 24.