The Bakersfield Police Department made a traffic stop near S. King Street and E. Brundage Lane around 9:30 Saturday night.
During the stop, one of the occupants took off running out of the vehicle and discarded a loaded firearm.
Officials were able to track him down and recover the firearm.
Officers arrested Jorge Alvarez, 27, of Bakersfield for firearm and gang related charges.