(CNN) The New York Police Department "failed" when an officer killed a 66-year-old mentally ill woman who attacked him with a baseball bat in a Bronx apartment, police Commissioner James O'Neill said Wednesday.

"We do have policies and procedures for handling emotionally disturbed people, and it looks like that some of those procedures weren't followed," O'Neill said during a speech to the Citizens Crime Commission in Manhattan. "What is clear in this one instance is we failed."

Mayor Bill de Blasio said deadly force should only be used in "dire situations."

"The shooting of Deborah Danner is tragic, and it never should have happened," de Blasio said Wednesday afternoon. "It's as simple as that."

To shoot or not to shoot?

To shoot or not to shoot? 02:42

To shoot or not to shoot?

Officers went to the apartment around 6 p.m. Tuesday after a neighbor called 911 about a woman acting in an irrational manner, Assistant Chief Larry W. Nikunen said. Police had visited the apartment on similar calls in the past, de Blasio said.

A sergeant entered the seventh-floor apartment and encountered the woman, who was armed with scissors, but he persuaded her to put them down, Nikunen said.

The woman then grabbed a baseball bat and attempted to hit the sergeant, Nikunen said. The officer fired two shots, striking the woman in the torso, he said. She died of her injuries after being taken to Jacobi Medical Center.

Officer on 'modified assignment'

The officer was armed with a Taser, but it was not deployed, Nikunen said. Why the stun gun wasn't used will be part of the investigation by the New York police's Force Investigation Division, Nikunen said.

Danner was a 66-year-old black female who lived alone, Nikunen said.

The woman's cousin, Wallace Cooke Jr., told CNN affiliate WCBS-TV that Danner first showed signs of mental illness in college.

"She was a very smart, book-wise person, and she don't deserve to be dead," he said.

Police identified the officer as Sgt. Hugh Barry, who is white and an eight-year veteran.

Thomas Antonetti of the Office of the Deputy Commissioner of Public Information said the officer is on "modified assignment" that requires him to be stripped of his gun and badge pending the investigation.

Nikunen didn't have details on the earlier incidents when police went to Danner's apartment.

'Our first obligation is to preserve life'

At a news conference, de Blasio said Deborah Danner's sister told him she was waiting for police to bring Danner out of the apartment Tuesday night so she could be hospitalized.

Jennifer Danner wasn't worried because police had done so successfully in the past, de Blasio said.

"I was down the hall from my sister's apartment when I saw officers rush in and I heard three gunshots," she told WCBS.

De Blasio said the officer had received training on how to de-escalate a situation. The mayor said investigators will ask why the officer didn't use his stun gun or wait for officers trained to deal with mentally ill people.

"We need to know why the officer did not follow his training and follow those protocols," he said.

O'Neill also talked about police training.

"That's not how it's supposed to go," O'Neill said. "It's not how we train. Our first obligation is to preserve life, not to take a life when it can be avoided."

He said the department policy is to "isolate and contain."

"If you have somebody in a certain area, time is on our side," he said. "ESU (the emergency service unit) is dispatched to every emotionally disturbed person job, so we had time."

Last year New York police responded to about 150,000 calls involving emotionally disturbed people, he said.

De Blasio said police have responded to 128,781 such calls this year, almost always successfully.

We're determined to get to the bottom of what happened and won't rest until we do. https://t.co/jPT1U4fX1H — Bill de Blasio (@BilldeBlasio) October 19, 2016

Attorney general to review case

Bronx Borough President Ruben Diaz Jr. issued a statement calling the shooting "an outrage, especially given the New York Police Department's knowledge of this woman's history and the police officer's possession of a stun gun."

"While I certainly understand the hard work that our police officers undertake to keep the streets of our city safe every single day, I also know what excessive force looks like."

Diaz called on New York Attorney General Eric Schneiderman and Bronx District Attorney Darcel Clark to investigate.

A spokesman for the attorney general said his office was reviewing the fatal shooting.

New York City Public Advocate Letitia James tweeted, "Police-involved shooting of woman in Bronx is concerning. We need a swift, thorough, transparent (investigation)."

Police-involved shooting of woman in Bronx is concerning. We need a swift, thorough, transparent invesitigation. https://t.co/YIQzXyv7n9 — Tish James (@TishJames) October 19, 2016

A lack of training?

Eugene O'Donnell, professor of law and police studies at John Jay College of Criminal Justice, said these situations are "all too common and all too predictable."

But the shooting appeared to be legally justified, he said.

O'Donnell said that ideally, mentally unstable individuals should be protected and overseen to make sure they stay on their medications.

He said the New York Police Department has specially trained officers for these types of incidents, but the officers who initially respond usually don't have that training.

"Anyone who says this was a Taser situation doesn't understand what the police do," he said. "A baseball bat can cause death or serious physical injury, and a Taser is not appropriate in a deadly force situation."

Jay Ruderman, president of the Ruderman Family Foundation, which advocates for people with disabilities, said about half of recent high-profile police killings involved people with disabilities. Danner's death highlights the need for better training by police, he said.