It happened around 1:27 p.m. in the city's Port Richmond section.
Police say two uniform officers in an unmarked cruiser pulled up behind a red Ford Mustang that was stopped in the intersection near B and Stella streets. Police say a 39-year-old male driver didn't respond when officers honked their horn.
WATCH: Philadelphia police provide update on fatal police shooting
According to Sgt. Eric Gripp, when officers approached the vehicle, the driver appeared to look up in surprise while armed with a handgun.
The suspect was able to flee police before later crashing in the area of "D" Street and Kensington Avenue.
Action News obtained video of the police pursuit moments before the crash.
The suspect fled on foot briefly before encountering one of the officers near Jasper Street and Hart Lane.
WATCH: Video captures police chase before fatal shooting
Gripp says the suspect produced a handgun and fired on the officer at least twice.
The officer returned fire, hitting the man. It's unclear how many times the suspect was hit.
Gripp says surveillance video and bodycam captured the shootout.
The suspect was transported to an area hospital where he later died.
Police say no officers were injured.