A viral video has captured the moment a man attempted to rob a store in Mexico with a gun.
The armed man with his hood up enters the store and looks around before pointing the gun at the cashier.
Also at the checkout is a man wearing a cowboy hat who is being served.
As the man with the gun points the gun at them both, the cowboy hat-wearing man puts his glasses down whilst the robber turns around and points the gun at another customer.
What happens next has shocked online users.
The man with the cowboy hat then throws himself at the thief who has his back turned, knocking the gun out of his hand.
A brief wrestle sees the thief get pushed down one of the aisles.
He then appears to have lost his jumper and is chased by two other workers in hygiene outfits who take the gun back.
As the thief attempts to escape the store, one of the workers slams him to the counter by his neck, before all three of them subdue him.
The cashier is then seen calling the police. He was later taken into custody.
Viral video: An armed robber is hit by instant karma after a failed hold-up
Viral video: The man in the cowboy hat then takes the robber down
The Imgur video has over 226,000 views already with many loving the cowboy hero.
One remarked: “If you have a gun pointed at someone and they look at you and slowly take their glasses off, you’ve already lost, just give up.”
Many were in agreement: “I like how to the cowboy put his glasses down first.”
Others felt he had put the other customer’s life at risk.
They wrote: “If it’s too dangerous to rush him when he’s pointing the gun at you, don’t rush him when he’s pointing it at some other poor sod.”
Viral video: The thief is then subdued by other workers
Instant karma is a common theme when it comes to viral videos with many people getting their comeuppance on CCTV.
A young woman found out the hard way what happens when trying to invade a pitch.
The student, from the University of Bath, jumps a fence and falls over when attempting to get onto the hockey pitch.
Despite laughter, she manages to get back to her feet and continues running forward.
What happens next appears to be a very painful ending.