The incident occurred around 10:40 a.m. near the intersection of Montgomery and Broadway streets after the officer approached the driver of a parked stolen vehicle, according to San Francisco police spokesman Albie Esparza.
Esparza said upon seeing the officer, the suspect began to drive away. A car door was ajar, and the force of the vehicle accelerating caused it to fly open, hitting the officer and causing the officer's weapon to fire a round, the spokesman said.
He said he initially learned that a patrol car may have been hit, prompting the officer to fire a round, but later learned that wasn't the case.
The officer was unharmed in the incident, which is being investigated by the police department's Internal Affairs unit, the spokesman said.
Officers later recovered the stolen car nearby in the 700 block of Clay Street. Police found that the vehicle had been punctured by a bullet but no evidence of any injuries, Esparza said.
Police are still attempting to locate the suspect.