RICHMOND — Detectives patrolling a Richmond neighborhood on Tuesday arrested a 21-year-old man who allegedly ran from the officers and pulled a gun from his waistband.

Gang detectives near the Crescent Park housing projects in the 4900 block of Hartnett Avenue around 4:50 p.m. Tuesday spotted a man who saw them and started running, Richmond police Sgt. Nicole Abetkov said.

The officers followed the man and saw him reach into his waistband and toss a gun into the backyard of an apartment in the Crescent Park complex.

The officers caught up to the man, identified as Richmond resident Jacob Colbert, and detained him, Abetkov said.

The weapon allegedly thrown by the suspect, a .45-caliber handgun, was also recovered.

The arrest occurred as police in Richmond beef up patrols of areas known to be frequented by gang members after a shooting on Saturday left two men dead in the city’s Iron Triangle neighborhood. The shooting happened on the same block where suspects fired more than 40 rounds into an apartment building days earlier.

Violent police encounters in California last year led to the deaths of 157 people and six officers, the state attorney general’s office said Thursday in a report that provides the first statewide tally on police use-of-force incidents.