For two flights down a darkened Brooklyn stairwell, Akai Gurley descended, mortally wounded by gunfire but apparently unaware that the single shot had come from a police officer’s 9 millimeter weapon.

A few paces down and fleeing the boom of gunfire, his girlfriend, Melissa Butler, turned when she no longer heard him behind her, according to an account provided by a senior police official who was briefed by investigators. Retracing her steps, she found Mr. Gurley, 28, near the fifth-floor landing and rushed to a family friend on the fourth floor of the housing project to call 911.

“My neighbor says her boyfriend has been shot,” the friend told the dispatcher, according to the police official, who had viewed the call logs. “Call the cops.”

Upstairs, two officers already knew who had fired the shot. A gun in the hand of one young officer, Peter Liang, had gone off one time, the round flying — and possibly ricocheting — down the dark, cinder-block stairway.