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: Woman Killed In Cupertino Late Night Suspected DUI Crash

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: DA Chesa Boudin Outraged; 2 Killed in Separate Shootings Saturday in San Francisco Potrero Hill Neighborhood

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: San Francisco Homeless Camp to Be Removed Monday, Advocates Say Residents Have Right to Stay

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