NEW YORK -- A police sergeant has been arrested on a murder charge in the shooting of a 66-year-old mentally ill woman in New York City.

Police said Wednesday that Sgt. Hugh Barry had been arrested in Deborah Danner's October 2016 death.

Police were responding to a 911 call about an emotionally disturbed person when Barry encountered Danner in her Bronx apartment.

Get Breaking News Delivered to Your Inbox

Authorities said at the time that Danner was threatening the sergeant with a bat when he shot her.

The police commissioner and mayor have condemned the shooting. They say Barry had a stun gun but didn't use it.

"It should never have happened," Mayor Bill de Blasio said a day after the deadly shooting, according to CBS New York. "The NYPD's job is to protect life."

NYPD Commissioner James O'Neill said the NYPD failed and some procedures weren't followed, the station reports. But police unions blasted de Blasio and O'Neill for their criticism, saying they rushed to judgment.

The Sergeants Benevolent Association, the union which represents Barry, told CBS New York it is "outraged" by Barry's indictment, adding he has "an exemplary record."

"Ms. Danner had a well-chronicled history of violence and mental illness," the SBA said. "Sgt. Barry took immediate charge of the situation by convincing Ms. Danner to put down a pair of scissors that she was gripping tightly in her hands. However, rather than leave the apartment, Ms. Danner ran back into the bedroom and grabbed a baseball bat."

The SBA said Danner "refused repeated orders to drop the bat and swung it directly at Sgt. Barry's head" before Barry opened fire.

"This is an absolute disgrace," SBA President Ed Mullins told the station. "The fact is that Sgt. Barry did everything right. He responded to the scene, took immediate charge, and de-escalated the situation by convincing the woman to put the scissors down. He was well within his rights to take the action that he did, even though that was the last thing he – or any police officer – would ever want to do."

Barry has been suspended from the NYPD, where he had been on modified duty since the shooting, reports CBS New York.