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.

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: Southbound I-275 Lanes On Howard Frankland Bridge To Close August 15

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.

READ MORE: Two Teens Charged In Connection With A Traffic Fatality

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: Toyota Is Offering To Buy Back An Electric SUV Because Its Wheels Could Fall Off

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.”