An NYPD union leader said Sunday that Mayor Bill de Blasio and Police Commissioner James O’Neill’s immediate condemnation of a sergeant who fatally shot a woman last week in the Bronx was a “rush to judgment and political pandering.”

Sergeants’ Benevolent Association president Ed Mullins said the sergeant has not been interviewed for his side of the story and accused O’Neill of being “neutered” by de Blasio.

De Blasio and O’Neill both have said the city “failed” Deborah Danner, 66, a mentally ill woman who was killed last Tuesday in a confrontation with Sgt. Hugh Barry, who has been stripped of his gun and badge and is on modified duty.

Speaking on WNYM-970 AM Sunday morning, Mullins defended Barry’s actions and said the case “looks tragic in a sense,” but all the details have not yet been made public.

“I’m not surprised at him,” Mullins said of O’Neill, who was sworn in as top cop just last month. “What I am surprised at is how short a period of time it took for him to get neutered by the mayor, and that’s pretty sad.”

In an emotional news conference less than 24 hours after the shooting, de Blasio said it was unacceptable. He said the NYPD had responded to past calls about Danner — who was wielding a baseball bat when she was killed — and taken her to the hospital without major incident.

At his own briefing, O’Neill said the sergeant was trained to avoid deadly force.

On Sunday, mayoral spokesman Austin Finan responded to Mullins with a statement: “New Yorkers deserve straight talk and that’s what they got from Mayor de Blasio and Commissioner O’Neill, both of whom spoke honestly about a clear fact: Deborah Danner didn’t have to die.”

Finan referred a question about Mullins’ argument that Barry wasn’t interviewed to the NYPD. Representatives for the police department did not return a request for comment.

“Not one person in the NYPD has interviewed him to get his side of the story, so we already convicted him,” Mullins told radio host John Catsimatidis, before referencing unrelated probes into alleged pay-to-play by de Blasio. “The mayor himself is under federal investigation and yet maintains his office.”

Bronx District Attorney Darcel D. Clark will lead the criminal investigation into the case after state Attorney General Eric Schneiderman said it does not fall under his jurisdiction.

Patrick Lynch, of the rank-and-file Patrolmen’s Benevolent Association, also weighed in on Catsimatidis’ show.

“I thought he made a rash call too quickly, when we had an unfortunate death of an emotionally disturbed person by a police sergeant,” Lynch said of O’Neill. “And so quickly, they determined that he was wrong — before an investigation, before the sergeant was interviewed, before talking to any of the people that were involved.”