MINNEAPOLIS (WCCO) — A Minneapolis man helped stop a robbery by pulling a gun on the bad guys.

Matt Dosser saw two men standing outside the University Market in northeast Minneapolis Tuesday night. One had a gun, and they had just attacked the clerk inside.

“I was really scared for his life,” Dosser said. “They were trying to kill him, in my opinion.”

It was his immediate reaction when he saw two men enter his store around 9:15 p.m. They wore their hoodies tight around their faces, and they began asking questions that didn’t make sense. After a couple uneasy minutes, they attacked.

“It happened in no time,” said the store’s owner, Mohamed Ahmed.

One the men jumped over the counter while the other pulled a gun and went after Ahmed. It was on captured on surveillance video.

The gunman started going through Ahmed’s pockets and then pistol-whipped him on the head.

Ahmed said he wrestled with them.

The robbers eventually fled and Ahmed locked the door. But a minute later they decided to try and break back in.

“By their behaviors and from what I saw, it appeared they were trying to get back into the store to finish the job,” Dosser said.

Dosser happened to be walking by University Market and saw a man with a gun pounding on the door. The gunman then looked at Dosser.

“There’s a million thoughts that go through your head in that, you know, 10 to 20 seconds,” Dosser said.

With a permit to carry a firearm, Dosser said he pulled out his own gun and held it at the ready position. That’s when the two men got into their vehicle and took off.

“I am shook up. Don’t get me wrong,” Dosser said. “This isn’t something that people like myself that carry a weapon ever want to have to do.”

Ahmed is thankful that Dosser arrived when he did. His head injury required six staples, and he’s hoping this story helps find those responsible.

“I hope it don’t happen to anybody else,” he said. “Because it’s not a pleasant situation to be in. If somebody comes at you with a gun he can do anything he wants. This is not fun. This is serious.”

Dosser helped Ahmed call 911, and police arrived just minutes later.

The gunman stole some cash from Ahmed’s pocket, but that’s all that was taken.