Bullets riddled police vehicles and struck a home in the 700 block of Emerson Street in Fox Chase, but fortunately did not strike anyone.
The standoff lasted more than seven hours.
Police were called to the block around 3:30 p.m. after reports of a man possibly having a mental health crisis with a lot of weapons potentially inside the house.
Police say the man locked himself inside and started firing at officers using a high-powered rifle.
Action News is told a SWAT truck was struck at least 10 times by gunfire.
At least one SWAT officer fired back at the house, but did not hit the suspect, authorities say.
No one was hurt during the shootout.
The man inside the home was taken in peacefully, after giving up when family got involved.
Neighbors were ordered to shelter in place as the standoff unfolded. The order was lifted at 11 p.m.
This incident played out as Philadelphia police officer Giovanni Maysonet recovers in a hospital after being shot in West Philadelphia on Wednesday.
"We're very fortunate. This is twice in 24 hours that our officers have come under fire, and again, we're very fortunate that this had a peaceful resolution," Philadelphia Police Sgt. Eric Gripp said