Jorge Angulo was arrested after police Officer Dale Golez drove by what appeared to be a fight between five people in the 700 block of Fifth Street at about 7:30 p.m. Monday, according to police.
Two of those involved immediately fled. A third, Angulo, appeared to be trying to conceal something from the officer, police said.
Two victims at the scene began to yell that he was trying to conceal a gun. At that point Angulo fled, police said.
Police surrounded the area, and the California Highway Patrol assisted in the search with a helicopter.
At about 8:15 p.m., Angulo was found hiding in the backyard of a house in the 1500 block of Empire Street.
A search of the path Angulo took when he allegedly ran from the crime scene led to the discovery of a loaded handgun and the recovery of property that had been stolen from the victims, police said.
Angulo was arrested and faces charges of armed robbery, use of a firearm in a felony, assault, and resisting arrest.