Deputy uses cans of beans to arrest suspect.

Thanks to the quick thinking of a resourceful Bay County Sheriff’s deputy, a hammer-wielding suspect is in custody following a showdown in a Panama City grocery store.

Justin Tyler Stanford, 25, walked into the grocery store last Thursday morning after destroying his vehicle nearby. When law enforcement was called to the scene, they were unsure what type of weapon Stanford was carrying.

In an effort to prevent injury to store shoppers, Bay County Sheriff’s Major Jimmy Stanford, who is unrelated to the suspect, sprung into action. He threw two cans of beans at the suspect, catching him off guard and allowing law enforcement to quickly arrest the 25 year-old.

WATCH VIDEO OF THE ARREST, VIA ABC NEWS