Police say the armed suspect stormed Anna's Deli on the 4400 block of Princeton Avenue and pointed the gun at the female owner who was behind the cashier.
"He announces the robbery and then reaches in the cash register and starts removing money, the clerk screams," Philadelphia Police Chief Inspector Scott Small said.
Investigators say the husband emerged from the back of the store with his own handgun.
"The suspect fires at least one shot at the store owner. The store owner returns fire," Small said.
The suspect was struck at least once in the chest and pronounced dead at the scene.
Police say the killing appears justified.
Neither of the owners were injured. Neighbors have identified the store owners as John and Anna Jukic.
"It's just unfortunate. I'm glad Anna is okay," neighbor Darryl Parker said.
"I've been here 35 years and they are wonderful," neighbor Mary Cotner said.
The dead suspect's name has not been released.
The Jukics were being interviewed by homicide detectives late Tuesday night.