The dramatic moment a heroic Starbucks customer beat down an armed robber with a chair has been caught on video.

Hero Cregg Jerri, 58, and suspect Ryan Michael Florez, 30, were both stabbed in the struggle for the suspect's knife during a stickup at a Starbucks in Fresno, California on Thursday.

Police said that Florez fled the scene and later claimed to be a victim of the robbery, but was identified as the robber with the help of surveillance video, according to the Fresno Bee.

He was armed with a large knife and replica handgun, according to police.

Hero Cregg Jerri, 58, is seen with his daughters in this family photo. Jerri thwarted an attempted armed robbery at a Freson, California Starbucks on Thursday

Fresno police Chief Jerry Dyer is seen briefing the media on the attempted Starbucks robbery

The video shows the suspect wearing a blue mask from the Transformers franchise approaching the Starbucks counter wielding a realistic -looking handgun.

He holds out a bag to the young woman working the register and then pulls out a large knife, waving it menacingly at her.

In the background, another Starbucks worker is cleaning table tops and smiles as Jerri picks up a chair and charges at the suspect.

Jerri, a 58-year-old sales director for Frito-Lay, is a regular at the Starbucks and knows the baristas.

The hero customer beats the suspect over the head with the chair and then the two wrestle over the knife.

The video shows the suspect wearing a blue mask from the Transformers franchise approach the Starbucks counter wielding a realistic looking handgun and knife

As a worker speaks into her phone, Cregg Jerri doesn't hesitate to pick up a chair and charge at the armed robber at the counter

Jerri beats the suspect mercilessly over the head with a chair, sending his mask flying off

Florez stabbed Jerri in the neck, requiring several staples, and Jerri gained control of the knife and stabbed Florez several times, police said.

Cops say that Florez got into a truck and drove away from the scene, but ditched the vehicle and was later found bleeding on the side of the road.

He claimed to be the victim but was quickly tied to the Starbucks incident.

Fresno police Chief Jerry Dyer said that Florez has no criminal record as an adult.

The suspect remains hospitalized and has yet to be booked, but will be charged with attempted armed robbery and assault with a deadly weapon.