Updated

A Philadelphia resident flipped the script on an accused home intruder impersonating a police officer Sunday, shooting and killing the suspect while sending his accomplice running from the scene. 

The incident happened just after 10 p.m. in the 7200 block of Battersby Street in the Mayfair neighborhood of north Philadelphia. A 25-year-old man told investigators two male suspects approached him outside the duplex and claimed to be police officers. They then forced their way inside, placed zip ties on the victim and started to threaten his life and demand money, police said.

"They tied his hands with zip ties around his back and threatened to kill him if he made any sudden moves. That's when our victim realized these individuals were not police officers," Philadelphia Police Chief Inspector Scott Small said, according to WPVI-TV. 

ATLANTA RAPPER ACCUSED OF TRAFFICKING GUNS TO CRIME PLAGUED PHILADELPHIA IN STRAW PURCHASING SCHEME 

The 25-year-old managed to free his hands and reach for a gun in his pocket. He fired toward the accused home intruders, striking one of them three times. Officers from the 15th District who responded to the scene found a man outside the front doorway with gunshot wounds to the head, chest and arm. 

Small said the man had a fake police badge strung around his neck. He was transported to Jefferson Torresdale Hospital, where he was pronounced dead at 10:19 p.m., Fox 29 Philadelphia reported. 

"I pulled out and shot right at him and that's it," the 25-year-old victim told Fox 29. 

WCAU reported the victim has a license to legally carry a firearm. 

The second suspect fled from the scene, and police were still looking to identify him. Police said it did not appear the second suspect was struck by the gunfire, according to WPIV. 

Police said the deceased suspect was also found with a gun and zip ties in his possession. Investigators recovered that weapon, as well as the gun from the 25-year-old victim.  

CLICK HERE TO GET THE FOX NEWS APP

The 25-year-old man and his girlfriend who was upstairs at the time were both taken into custody for questioning and later released. No charges were immediately filed. 

Small told reporters police located some cameras in the neighborhood and were searching for video to aid in their investigation.