Shots rang out on the 2800 block of Jackson Street in South Philadelphia around 11:15 p.m. Thursday.
The officer was pursuing a suspect wanted for a narcotics arrest.
Police chased the man into a house.
A dog at the home attacked the officer.
He fired a gunshot at the dog, but it did not strike the animal.
The suspect was arrested.
No one was hurt.