A man was walking along the Alemany Boulevard in San Francisco when a group of boys approached him and demanded his cellphone, police said.
One of the robbers pulled out a gun while the other robbers rifled through the victim's pockets.
The victim was not resisting and complying with the robbers' demands, but the armed man fired one shot at the victim anyhow, Sergeant Danielle Newman was quoted as saying by the SF weekly.
The shot bounced off the victim's face and instead hit Clifton Chatman, one of the robbery suspects, killing him instantly, police said.
The incident happened on December 14 and San Francisco police have arrested a teenage boy for allegedly shooting and killing Chatman, who police say was the suspect's partner-in-crime.
The other robbers ran from the scene. When police arrived, they found the wounded robbery victim and the the deceased robbery suspect. The victim survived.
Police are not releasing the suspect's name or photo because he is a juvenile. The suspect is being charged with attempted robbery and murder.