Follow CBSMIAMI.COM: Facebook | Twitter

YOUNGSTOWN, FL (CBS Local) – A Florida deputy is being praised for his expert aim after stopping a hammer-wielding suspect with a can of baked beans.

READ MORE: Dolphins Come Through With Dominating Performance, Blowing Out Panthers 33-10

Officers arrived at a Rainbow Food Store in Youngstown on May 31 after police were called to confront a man who was allegedly carrying a gun. When Sheriff Tommy Ford, Deputy Chief Joel Heape, and Maj. Jimmy Stanford found the suspect in the store, he was actually carrying a hammer and began attacking the officers.

READ MORE: CBS4’s Mike Cugno Catches Up With Nat Moore Trophy Finalists QB Zion Turner & DE Marvin Jones Jr.

Maj. Stanford had a surprise for their attacker and “bush-whacked” the suspect. “I saw Jimmy poke his head out, the next thing I know he steps out with a can of Bush’s extra brown sugar baked beans and hits the suspect in the upper body and distracts him,” Sheriff Ford said, via the Panama City News Herald.

The deputy pelted Justin Tyler Stanford with two cans of beans, giving his partners the chance to wrestle the 25-year-old to the ground and arrest him. The hammer-wielding man was charged with assault with a deadly weapon on an officer, resisting arrest with violence, and DUI for an accident he was reportedly in before entering the Rainbow Food Store.

MORE NEWS: ‘I Have Goose Bumps’: Zoo Miami's Ron Magil On 'Rita' Laying 2nd Egg On Live Bald Eagle Cam

Maj. Stanford added that he thought the 16-ounce cans were a safer and more surprising choice than using his gun on the attacker. “My thoughts were I could take these and hit him with them and they’re not going to kill him, a less lethal alternative.”