Mayor Bill de Blasio has vowed a thorough investigation into the fatal police shooting of a 66-year-old woman who attempted to strike a sergeant with a baseball bat inside her Castle Hill apartment Tuesday night.

De Blasio identified the woman as Deborah Danner during a news conference Wednesday. He said Danner was known to the NYPD as having a mental illness, but did not provide details of a diagnosis. There were at least two prior instances when police were called to Danner’s apartment, resulting in her safe removal to a hospital, de Blasio said, emphasizing that officers had followed protocol in the past.

The mayor called Danner’s death "tragic and unacceptable," and said that police are investigating why the sergeant didn't use his stun gun instead of his weapon. The sergeant, who was identified by a law enforcement source as Hugh Barry, has been placed on modified duty.

"This should never have happened. It's as simple as that," de Blasio said. “Deborah Danner should be alive right now, period.”

NYPD Commissioner James O’Neill said Wednesday morning that police “failed” in shooting Danner.

"What is clear in this one instance, we failed,” O'Neill said. "I want to know why it happened." 

Officers had responded to a call about an emotionally disturbed person at 630 Pugsley Ave. in Castle Hill around 6:05 p.m. Tuesday, Bronx commander, Chief Larry Nikunen, said at a news conference that night.

When a sergeant entered Danner's seventh-floor apartment 10 minutes later, he found the woman alone in her bedroom holding a pair of scissors. The sergeant was able to talk her into putting the scissors down, Nikunen said, but she then grabbed a baseball bat and tried to hit him with it.

Nikunen said the sergeant then fired two shots, striking Danner in the torso. She was taken in critical condition to Jacobi Medical Center, where she later died, Nikunen said.

De Blasio said the sergeant did not follow the NYPD's protocol for handling emotionally disturbed people, but that he had been trained under recently updated protocols for such situations. De-escalation, de Blasio said, was part of the training.

“There was protocol that was not followed. There was the option of using a Taser; that was not deployed,” de Blasio said. “We need to know why this officer did not follow his training and the protocols.”

Bronx Borough President Ruben Diaz said police should not have used such force with Danner.

"This elderly woman was known to the police department, yet the officer involved in this shooting failed to use discretion to either talk her down from her episode or, barring that, to use his stun gun," he said. "That is totally unacceptable."

The shooting is being investigated by the Force Investigation Division. De Blasio said the city will cooperate fully with any criminal investigations that may follow from either the state attorney general or the Bronx district attorney, but could not say whether either office was planning to probe the case.

“We are determined to seek justice and to ensure a tragedy like this won’t happen again in this city,” he said.

State Attorney General Eric Schneiderman’s office is looking into whether the shooting falls under a 2015 executive order that would allow it to take over the investigation, spokeswoman Amy Spitalnick said. “We extend our deepest condolences to Ms. Danner's family,” she added.

A spokeswoman for Bronx District Attorney Darcel Clark said the DA’s office is involved in the investigation, but whether it leads the case depends on the decision from the attorney general’s office.