Port Elizabeth police arrested a 19-year-old suspect after he allegedly robbed an elderly couple walking along Marine drive.
Police Spokesperson Colonel Priscilla Naidu says a woman was robbed of her necklace before the suspect jumped into a taxi.
Members of the community who saw what happened stopped the taxi to get hold of the suspect.
The man then fired a shot, hitting a member of the community in the hip.
Naidu says the teenager will appear in court on a charge of attempted murder and armed robbery.
Police also seized a firearm used in the crime.