It happened after 3:30 p.m. Monday in the 1000 block of Chester Pike.
Police say an officer stopped a white Nissan for a traffic violation.
They say the driver got out, ran down Chester Pike toward Barker Avenue, then crouched behind a car.
Police say he then pulled out a handgun and started firing at the officer.
The officer shot back, hitting the suspect twice.
The suspect, a man in his 30's, was taken to the Hospital of the University of Pennsylvania in stable condition.
The officer was not injured.
Police say as many as 12 shots were fired between the officer and the suspect. Investigators did recover a weapon at the scene.
There was no immediate word why the man was running from police.