Police radio transmissions captured the panic that came next as an officer frantically requested an ambulance. Police officials did not release the body-camera video.

“I need a bus! I need a bus!” he said, using police jargon for an ambulance. “Shots fired.”

But instead of waiting for an ambulance, the other officers piled Officer Mulkeen into a police car and raced toward the hospital, one witness said.

Two men who said they were playing chess and dominoes when the gunfire began said there were four groups of Bloods and Crips in the complex that fought over territory and drugs. A feud between two of the Bloods sects, the Stones and the Hounds, over sales of $5 bags of marijuana, had culminated in a shooting on Thursday, according to one of the men, who identified himself only as Al because he feared for his safety.

Officer Mulkeen joined the force in January 2013, after growing restless with an early career in finance, friends and neighbors said. After a patrol stint in the 48th Precinct, he was assigned to a borough anti-crime unit responsible for catching criminals in the act, the police said. He lived in Yorktown Heights with his girlfriend, who is also a police officer in the Bronx.

“Brian was a great cop dedicated to keeping this city safe,” Chief Monahan said. “In fact, just last night he arrested a man in possession of a gun in the very same precinct.”

It was one of more than 260 arrests Officer Mulkeen made over the last six years — more than half of them for felony charges. He had earned five medals for excellence, the police said.