NYPD officers responding to a report of an armed robbery shot and killed a man in East Williamsburg in Brooklyn on Sunday morning after he fired at them, the Daily News reported.

The shooting happened around 7:45 a.m. on Debevoise Avenue and Jackson Street near the Cooper Park houses, police told the News.

According to reports, the officers tried to stop a man armed with a .40-caliber semiautomatic handgun who opened fire at them. The officers returned fire, striking the suspect twice, NYPD Chief Jeffrey Maddrey, the head of Patrol Borough Brooklyn North command, who spoke at a press conference at the crime scene, the News reported.

The suspect, who has not been identified, is believed to be in his 30s.

A witness quoted by the Daily News said before police arrived the suspect pulled a gun on a man and threatened to shoot him while demanding his money. He also pistol-whipped an elderly man on the street..

None of the officers were shot but two officers involved in the shooting were taken to Elmhurst Hospital for observation, NY1 reported.