The officers returned fire, hitting the suspect, and he crashed into a parked car in the 1000 block of Gough Street, according to police.
The man was taken to San Francisco General Hospital to be treated for injuries that are not life-threatening, Dangerfield said. Police are now interviewing him and have not yet released his name.
No one else was injured in the shooting.
Investigators recovered two weapons from inside the Honda -- an AK47 assault rifle and a handgun, police said.
Several blocks of Gough Street were shut while detectives surveyed the crime scene.
A gardener who was planting a tree at Jefferson Square Park near the corner of Gough and Eddy streets said he heard two distinct shots, followed by heavy gunfire.
Immediately after the succession of gunshots, the gardener heard a loud crash. He said he ran toward the Honda Accord, shovel in hand, and saw two plainclothes officers crouched near the car with guns pointed at vehicle.
The driver was slumped over the wheel and his head was moving slightly, said the gardener, who didn't want to be identified.
"Cops were here in rapid time," he said.
Peter Gorman, who lives on Ellis near Gough, also said he heard two shots then a rapid succession of five to 10 shots.
He later went outside with his dog to see what had happened and found the street filled with police.
Sacred Heart Cathedral Preparatory is located near where the shooting happened, but a woman answering the phone there said the school was not affected.