Pittsburg police say that the shooting happened when the girl's mother was driving her and her two siblings, a 6-year-old and a 6-month-old, on Buchanan Road at Harbor Street just before 2 p.m.
According to the investigation, another driver pulled alongside the car and fired a single round from a handgun, which hit the 12-year-old in the leg.
RELATED: SF road rage shooting suspect leads police on chase, ends in violent crash downtown
The mother then fled to a nearby shopping center to call for help and when paramedics came, the girl was taken to the hospital, where she is in stable condition.
An arrest was made Friday evening and the suspect is in custody.
RELATED: 13-year-old injured, student in custody after shooting at East Oakland school, police say
Anyone with more information on the shooting can call the Pittsburg Police Department at (925) 646-2441.