Dramatic surveillance video shows a foiled attempted armed robbery thanks to the quick thinking of a man wearing a cowboy hat.

The footage appears to show a young man walking into a Carnes Cares store in Monterrey, Mexico, wearing a dark-colored hooded sweatshirt, according to Reuters. He quickly pulls a gun and points it at the store employee behind the cash register.

Man wearing cowboy hat tackles would-be armed robber at store in Mexico.(Carnes Cares/Reuters) Man wearing cowboy hat tackles would-be armed robber at store in Mexico.

The man in the cowboy hat, who is standing near the register, takes advantage of the would-be robber's momentary distraction and tackles him in dramatic fashion, wresting his gun. Another employee takes the weapon as the man attempts to take down the attempted bandit.

Good Samaritan wearing cowboy hat tackles armed robber at butcher shop in Mexico.(Carnes Cares/Reuters) Good Samaritan wearing cowboy hat tackles armed robber at butcher shop in Mexico.

The suspect can then be seen, shirtless, attempting to escape the store, but three individuals, including the good Samaritan in the cowboy hat, finally subdue him as the employee behind the counter appears to make a phone call.

Man wearing cowboy hat tackles armed robber at butcher shop in Mexico.(Carnes Cares/Reuters) Man wearing cowboy hat tackles armed robber at butcher shop in Mexico.

The identities of those involved are unknown.