Authorities arrested Erick Ortega and one other adult and two 17 year olds.
Police say the suspects drove up to a convenience store on 8th and M Streets and fired several shots at someone standing outside.
A Merced police officer saw the shooting and tried to stop the car, but it sped off.
The Toyota Camry eventually lost control and hit a tree and a highway sign at 16th and V Streets.
Firefighters had to use the Jaws of Life to remove the suspects trapped inside.
All four were treated for minor to moderate injuries before being booked into jail and juvenile hall.