NEW YORK — Police on Wednesday released video from body cameras worn by two officers showing they repeatedly yelled at a man who had stabbed two security guards to drop the knife he was holding and then fatally shot him when he took a step toward them.

The officers had responded to a Bronx homeless shelter this month after getting a call about an assault. They confronted Cornell Lockhart, a 67-year-old resident of the shelter with a history of mental illness, in the lobby.

Authorities said Lockhart had stabbed the two guards before they arrived.

The cameras videos , both a little over 40 seconds long, show Lockhart standing a few feet away from the officers, with another person in between who then backs away toward the officers. The officers continue to yell for Lockhart to drop the knife, then shoot multiple times when he takes a step forward.

Lockhart was hit several times and fell to the ground.

The officers involved are uniformed, not part of the unit specially trained to deal with people who are emotionally disturbed.