Police say the homeowner got into a scuffle with one of the suspects. Before it was over, multiple shots were fired and one of the suspects was dead.
"The witness was able to gain control of the handgun and fire it multiple times at the first male, mortally wounding him. The witness also fired at the second gunmen as he fled the property," said Captain Jason Smith with the Philadelphia Police Department.
Police say the criminals didn't know the homeowner and were after drugs.
"There were 265 grams of marijuana recovered from the premises along with marijuana-infused edible gummy bears," said Captain Smith.
Officers say the drugs have a street value of about $5,000.
Those living in the community were alarmed by the overnight gunfire.
"What is going on? I looked out the door and heard more gunshots and went back in the house," said Mike McGrail of South Philadelphia.
Police say the second suspect involved got away and the homeowner is still recovering in the hospital but could face charges.
"The witness is not expected to face charges regarding the shooting incident. The witness may, however, face charges regarding the narcotics located in the residence," said Captain Smith.
Police have not released the name of the homeowner. The search continues for the second suspect.