A pizza delivery man is in the hospital after being shot on the job during an attempted robbery in Philadelphia, but police say he managed to pull out his own gun and fire back.

It happened at about 7pm Monday in the Kingsessing neighborhood.

THIS IS WHAT $20 MILLION HIDDEN UNDER A MATTRESS LOOKS LIKE

Tuesday morning, Philadelphia Police Commissioner Richard Ross told FOX 29’s Lauren Johnson the delivery man realized the call came from an abandoned area so he called back to his shop.

Then, moments later, there was a gun at the 36-year-old’s head. He tried to run but got shot twice, including once in his arm.

After that, the commissioner confirmed the victim shot back and this time, it was the robber who took off running and the victim drove himself to the hospital.

Now, police have the delivery man’s gun. They’re hoping a camera in the area could shed more light into the incident and help catch the gunman.

Click for more from Fox 29.