NEW YORK (CBSNewYork/AP) — The NYPD says police fatally shot an armed suspect at a housing project in Brooklyn.

Police say the suspect was shot after he fired at responding officers around 7:45 a.m. Sunday.

READ MORE: Sen. Gillibrand, Rep. Torres Propose Federal Heat Sensor Requirement In Wake Of Deadly Bronx High-Rise Fire

They say the suspect was involved in two armed robberies moments before officers responded to a gunpoint robbery at Cooper Park Houses at 20 Debevoise Ave. in East Williamsburg.

WLNY’s Steve Langford reported the gunman fired at least five shots at cops and police fired as many as 12 to 15 times back.

According to their preliminary investigations, police say the suspect fired multiple times at responding officers. They say police fired back, striking the suspect in the torso.

Brandon told 1010 WINS’ Carol D’Auria that he saw the suspect beating a man.

READ MORE: Remote Option Returning To NYC Schools As Omicron Continues To Fuel Nationwide Spike In COVID Cases

“I heard the old man go up to him and say, ‘Why are you doing this? Can you stop?’ Then the guy had punched him and the old man had fell. Then the guy went towards the cops and the cops said freeze, and then that’s when the shots came,” he said.

Another eyewitness told 1010 WINS the suspect pistol-whipped the man and then fired at police.

The suspect was pronounced dead at a hospital. The suspect was identified as Jermaine Johnson, 42, of Brooklyn.

“The guy got what he deserved. He came in to hurt people and the police did their job,” witness Dennis Borges said.

Police say his gun was recovered at the scene.

No officers were injured but two were taken to a hospital for observation.

MORE NEWS: Driver Charged After 15-Year-Old Girl Struck, Killed By School Bus In Brooklyn Hit-And-Run

(Copyright 2016 by The Associated Press. All Rights Reserved.)