An armed man wearing a mask stormed into a bar on 14th Street NW early Thursday trying to get cash -- but got punched in the face by a bartender instead.

Barcelona Wine Bar & Restaurant, near R Street NW, was full of customers about 12:40 a.m. Thursday when a man rushed inside, workers said.

Bartender Michael Cohen said he knew something was wrong right away.

"I saw somebody come in with a ski mask, really quickly through the front door, reaching in his waist band," he said. "He announced his intentions as soon as he got to the bar and I just clocked him in the jaw."

Cohen hit the would-be-robber with a right hook, he told News4. Little did the man know, Cohen had studied mixed martial arts since he was a teenager.

Cohen and another bartender wrested a knife away from the suspect and held him until officers arrived, he and worker Hartin Ballabani said.

The 34-year-old man was arrested and charged with attempted armed robbery and is being held without bond, police said. He was caught on surveillance video, court documents say.

The Barcelona bartender said he's thankful no one was seriously hurt.

"It was shocking, but it is the city, and people are going through hard times in the city," he said. "I'm not going to judge the guy. I don't know what kind of struggle he was going through mentally."

Customer Erick Sanchez, who told Borderstan.com he witnessed the attempted robbery, started a funding page to "give the hero at Barcelona a tip."

“I hope we can give him a nice little token of our appreciation,” Sanchez told the local news website.