FRESNO, California (CBS) – Cregg Jerri, 58, was enjoying his Starbucks order and working on an iPad when all of a sudden a man holding a yellow bag and wearing an Optimus Prime mask flashes by and heads to the register.

Jerri watched as the man threatens the clerk with a fake gun and eventually a buck knife demanding money.

Police investigators say the man in the mask was 30-year old Ryan Michael Flores, and what Flores didn't realize was that Jerri had made up his mind.

With a chair in hand, he planned to stop the robbery attempt.

Jerri hit Flores from behind and a fight ensued. Investigators said Jerri was stabbed in the neck during the struggle, but managed to wrestle away the knife and stab Flores several times. Flores fled the store and was later arrested by police.

Jerry Dyer Fresno Police Chief said, “There’s probably not very many people in America who would do what Cregg Jerri did last night. It was incredibly heroic and the way most people would think that they would respond but may not have the courage to respond.”

This video has made national headlines, and Jerri is being touted a hero locally and on social media, but police leaders say getting involved like this was risky and it could’ve had tragic consequences.

Dyer said, “It’s not something we recommend, in this case it was a good outcome. Nobody died as a result of this incident, but they very well could have.”