NYPD officers fatally shot a man in Brownsville early Monday morning. Officials say the suspect, who was wearing a mask, had fired at police in two locations.

At least 55 shots were reportedly fired; one report suggested police alone fired 64 shots.

NYPD Chief of Patrol Terence Monahan said that uniformed officers had been patrolling Howard and Dumont Avenues just after 2:30 a.m. "when they observed a suspicious male wearing a mask covering his face." However, when the three officers tried to speak to the man, Monahan said the man fled towards 788 Howard Avenue.

"One officer exited the vehicle and the other two drove onto Howard Avenue, the perpetrator fired numerous rounds at the their vehicle, striking it," he said during a press conference. "The officer who exited the car then exchanged gunfire with the male. However, the perpetrator fled from the officers."

Photographs of gunshots on police vehicle

Then, a half hour later, a resident said that someone was trying to break into a backyard on Howard Avenue. "As uniformed patrol officers gained entry to the backyard they were fired upon numerous times and exchanged gunfire with the perpetrator," Monahan said. "These officers became pinned down at the location due to the perpetrator firing. Additional officers, including Emergency Service Unit, also made entry into the backyard area where rounds continued to be fired by the man. Our officers returned fire and the man was then taken into custody."

PIX11 photographer Vincent Shields had been on the scene after the initial encounter between officers and the suspect when shots were fired in the backyard. "I saw [officers] going toward a fence to check the backyard. I watched them climb the fence and then heard gunshots," he said. "They broke the fence and jumped over. Cops behind me were yelling. It was really chaotic."

The suspect was taken to Brookdale Hospital, where he pronounced deceased. NYPD officials say they found a semi-automatic handgun at the scene.

No officers were injured. Officials say seven police officers fired their weapons–one on Howard Avenue and the other six in the backyard.

"The great work by our cops today demonstrates, once again, how they never hesitate to go into harm's way to keep our city safe," Monahan said.