FRESNO (WFLA) — Police in Fresno are investigating an attempted robbery and stabbing that happened earlier this week inside a Starbucks.

Surveillance video captured the moment the suspect walked in, and the moment a customer took him on to stop the robbery.

Around 5:30 Wednesday, investigators say Ryan Flores walked into the Starbucks with a knife and a toy gun, and demanded money from an employee.

When customer Cragg Jerri saw what was happening, he picked up a metal chair, came up behind Flores and hit him in the back.

Video then captures the two fighting.

Police say Jerri was stabbed in the neck during the struggle. He is expected to be okay, and is now being called a hero.

“It’s not something we recommend. In this case, it was a good outcome,” Police Chief Jerry Dyer said. “No one died as a result of this incident, but very well could have. But nonetheless, he’s a hero. There’s no question.”

Jerri also managed to wrestle the knife away, then stabbed Flores several times before the suspect ran away.

Flores admitted to his crime when police found him later near a canal. He was taken to the hospital in critical condition.WHAT OTHERS ARE CLICKING ON: