An officer with the New York City Police Department who was fatally shot while struggling with a suspect during an arrest in the Bronx was killed by friendly fire, officials said Monday.

Brian Mulkeen, 33, died Sunday after he was shot three times while trying to apprehend Antonio L. Williams, who had fled after officers tried to question him.

New York Police Department Officer Brian Mulkeen was shot and killed in the Bronx. Sergeants Benevolent Association

Police said Sunday that five officers had fired their weapons during the altercation.

Police Commissioner James O'Neill said Monday that it was an officer who shot Mulkeen, according to NBC New York. Mayor Bill de Blasio called Mulkeen, who had been with the department for more than six years, a "hero."

Mulkeen was patrolling with the city's anti-crime unit monitoring gang activity when he and two other officers saw Williams in his car and questioned him at around 12:30 a.m. In bodycam video, Mulkeen can be heard yelling that Williams was reaching for a gun.

Williams, 27, died at the scene. His .32 caliber revolver was found nearby, police said. Chief of Department Terence Monahan said the suspect's weapon had not been fired, NBC New York reported.

Mulkeen was rushed to the hospital, where he later died of his injuries. He is the second officer in New York who died in the line of duty this year. In February, Detective Brian Simonsen was accidentally killed by friendly fire while responding to a robbery.