But things turned deadly early Sunday after his struggle with an armed man erupted in gunfire that left both men dead, Police Department officials said.

Here’s what we know about the shooting

While attempting to subdue the man, around 12:30 a.m. Sunday, the officer, Brian Mulkeen, 33, was shot twice in a tragic case of “friendly fire” by fellow officers, the police commissioner, James P. O’Neill, said yesterday .

Officer Mulkeen had approached the armed man, Antonio Lavance Williams, 27, to question him about several recent shootings. But Mr. Williams fled.

Officer Mulkeen and his partners chased him, and Officer Mulkeen wrestled him to the ground.

They engaged in a 10-second “violent struggle,” Commissioner O’Neill said. A burst of gunfire followed, as multiple officers discharged their weapons. When it was over, Mr. Williams and Officer Mulkeen were mortally wounded.