Updated

California police released video showing a Starbucks patron struggling with a would-be robber in a Transformers mask who tried to stage a hold-up with a knife and toy gun.

Police credited Cregg Jerri, 58, with thwarting the robbery at a Fresno Starbucks Thursday.

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

Police said the man in the Transformer mask was 30-year-old Ryan Flores.

The video begins with Flores announcing a robbery. He shows the gun to a barista and then the knife.

Next, Jerri is seen sneaking up from behind and bashing Flores over the head with a chair.

3cfb5df2-starbucks

Cregg Jerri was caught on video interrupting a robbery at a Fresno, Calif., Starbucks. (Fox 26 Fresno)

The video then shows Jerri fighting Flores and eventually wrestling him to the ground.

As they struggled, Jerri realized the gun in Flores' hand wasn’t real when the weapon struck the floor, KMJ-Radio reported.

Police said Jerri was stabbed in the neck as he tried to grab the knife from Flores.

They said when Jerri took the knife away, he stabbed Flores several times.

58833c6d-starbucks

Cregg Jerri was caught on video interrupting a robbery at a Fresno, Calif., Starbucks. (Fox 26 Fresno)

Both were treated at a hospital.

"It's not something we recommend,” Dyer said of Jerri's actions, according to KFSN-TV. “In this case it was a good outcome -- no one died as a result of this incident, but very well could have. But nonetheless, he's a hero -- there's no question."