A Philadelphia man taking a smoke break outside his home "turned the tables" on an armed would-be robber when he pulled out his own legal gun and fatally shot him, according to police. 

"It looked like a robbery victim, at this time, turned the tables on a would-be robber and shot him in the head," Philadelphia Police Chief Inspector Scott Small said of the matter, according to NBC 10. 

The incident unfolded just before 11:30 Wednesday evening in South Philadelphia near Moyamensing Avenue. A 24-year-old man smoking outside his home told police that a would-be robber approached him while riding a bike and soon pulled out a gun and "announced a robbery," according to police. 

Philadelphia Police

Philadelphia, United States June 11, 2013: Unidentified person walks by Philadelphia Police Ford Explorer. Philadelphia Police Department is the oldest city police agency in the US (formed 1751).  (iStock)

The resident pulled out his own licensed to carry gun and opened fire on the would-be robber, police said. The alleged robber was shot in the head, but was able to fire off a round or two, the 24-year-old South Philly man told police. 

KNIFE-WIELDING MAN ATTACKS PHILADELPHIA POLICE OFFICERS INSIDE DISTRICT HEADQUARTERS

"According to the 24-year-old who fired the shot, the perpetrator, after being shot in the head, pulled his gun and fired one or two shots, but did not strike the 24-year-old who fired the initial shot," Small said. 

Philadelphia

The Philadelphia Energy Solutions oil refinery owned by The Carlyle Group is seen in front of the Philadelphia skyline March 24, 2014. Picture taken March 24, 2014.       To match OIL-ETHANOL/LOBBY       REUTERS/David M. Parrott   (REUTERS)

FAR-LEFT PHILADELPHIA DA LARRY KRASNER'S COMPANY OWES $86,000 IN UNPAID TAXES

Police responded to the scene and found the 30-year-old Asian male laying on the sidewalk with a gunshot to the head. He was transported to a hospital and died early Thursday morning, according to police. 

CLICK HERE FOR THE FOX NEWS APP

Two guns were recovered from the scene. No charges have been filed and the investigation is ongoing.