An officer shot a man who department officials said charged at police with a knife following a foot chase and an "aggressive confrontation" in Buffalo's Black Rock neighborhood.

The man who was shot, identified as 47-year-old Marcus Neal, was pronounced dead at the hospital, say police.

The officer who fired his service weapon, identified as 25-year-old Joseph Meli, was also checked out at the hospital, was determined to be OK, and as according to the department's critical incident policy, an internal investigation now begins.

Police say officers got a call around 11:20 p.m. Tuesday about a shoplifter at the Amherst Street Wegmans. An officer was already at the store.

About 12 minutes later, police officials said the suspect was found across the street. A pursuit on foot led officers about one mile to Gladstone Street. Police say there, the suspect went into a backyard and climbed onto a garage roof.

Police officers joined him on the roof, where police said the suspect produced a knife and charged at the officers.

"When he pulled the weapon, it left no ability for the officers to safely retreat," said Capt. Jeff Rinaldo, Buffalo Police Department. "They tried everything they could and he refused commands to drop the weapon and the officer fired to protect himself and his fellow officers."

This is the third time since this July that a Buffalo police officer has shot a suspect. One of those people, Rafael Rivera, died after an incident on the city's west side in September.