Getty Images

A customer turned the tables on a would-be robber and shot him dead with his own gun. The incident happened just after 1 a.m. on Tuesday in the Olny neighborhood of Philadelphia.

According to ABC 6 Actions News, the robber approached a customer at an ATM machine inside a smoke shop and demanded money.

As the suspect allegedly robbed the customer at gunpoint, he was momentarily distracted by his accomplice who had entered the shop.

The quick-thinking customer grabbed the gun away from the suspect and shot him as he attempted to flee.

When the customer hit the suspect in the face with the gun it discharged sending a bullet through the glass door. The bullet hit the accomplice who was standing outside. The accomplice was shot in the shoulder but is expected to survive.

Police found a Toyota abandoned about two blocks away from the smoke shop. The robbery suspect was dead inside the vehicle.

Police are still searching for the driver of the Toyota. The customer is cooperating with investigators. Police say there are no charges against the customer at this time.

Watch the video below.