NEW YORK (CBSNewYork) — A remarkable series of events was caught on camera, as a man burst into a deli for a robbery that could have turned deadly for an employee and his father.

The son said it was just another quiet Brooklyn night. He was working the counter and his father came outside to tidy up.

Then a double-armed thief walked over.

As deli owner Ahmed Kassim brought in uncollected trash late Friday night, a masked man in an orange coat pushed him inside.

The man choked and punched Kassim until his son, Ashraf, jumped in from behind the counter and wrestled the gun from the man’s hand.

“When I grabbed the first gun I thought it was over, like we’re safe, just a fight, nothing’s gonna happen to me cause I got the gun, nothing’s gonna happen to my father,” Ashraf said.

The man in the orange had a second gun and shot Ahmed in the stomach.

“I had no other choice, I just hit him in the head to make him stop. I was like stop, stop I got your gun,” Ashraf said. “You shoot my father already, I don’t wanna shoot you just stay on the floor.”

A customer with good timing saw what was going on through the window and ran into the road to flag down a car.

The men in that car turned out to be undercover cops.

Inside the store, Ashraf was struggling to hold the man down.

“I took the second gun out of his hands, then the cops was outside,” he said.

He threw the guns to show the cops they weren’t his, and the officers arrested the man in orange, before peeling off his mask.

“I was so surprised because he used to live upstairs for nine years. We known him for nine years and never had no problem with him,” Ashraf said. “I asked him why would you do that, everyone treats you like family here, and he’s like I don’t have no other choice, I need some money.”

Jermaine Alleyne, 26, was arraigned on robbery and attempted murder charges. He was being held on $50,000 bail.

The deli owner was recovering from his wound. His son said he feels incredibly grateful to both the customer and the officers for saving their lives.