Authorities say two pit bulls attacked a man walking his Rottweiler at 54th and Spring streets around 5:45 p.m. Wednesday.
The man's friend tried to diffuse the attack first by screaming.
When that failed, the man pulled his gun and fired four shots, striking one of the pit bulls in the leg and the other in the stomach.
Police say the friend has a permit to carry a concealed weapon.
The pit bulls both managed to run back to their home.
All the dogs are being treated by animal workers.
The man was taken to the Hospital of the University of Pennsylvania for treatment.