(KTXL) — Woodland Police are thanking a bank customer who helped prevent a bank robbery by talking to and calming the suspect.

According to a social media post from police, a 43-year-old man entered a bank on Main Street Monday morning and handed over a note to a teller that said he was robbing the bank and that he had a firearm.

A customer who was inside the bank and saw what happened began talking to the suspect, encouraging him not to go through with his actions.

Police said that the man’s efforts worked, convincing the suspect to leave the bank.

The suspect was arrested outside of the building and booked into Yolo County Jail for attempted robbery.

Police praised the “quick-thinking and brave” person who “delivered the right message,” helping to prevent a crime.