When a pair of armed robbers barreled into a cellphone store in New Jersey demanding money and phones, they clearly didn't realize how quickly the manager would turn the tables on them, as evidenced by surveillance video.

The armed men burst into a Boost Mobile cellphone store in Paterson Wednesday afternoon and held up manager Tomy Torrez. He did what he was told.

"I say, check the walls and take whatever you want," Torrez told NBC 4 New York. "So when they were busy I start running to the back."

That's when Torrez got smart: he opened a back door that connected to another office and told everyone there they needed to get out. Then he went out another door from that space and slammed the gate there, blocking the back exit. And he went back to the front of the cellphone store and did the same thing from the outside.

Surveillance video shows the exact moment the metal gates slammed down on the storefront, sparking panic from the robbers.

"Get us outta here!" they shouted as they desperately tried to slam through the glass.

By that time, a crowd had gathered outside the store. They gawked and laughed at the robbers trapped inside, cellphone video taken by one of the passersby shows.

"I can't let you outta there!" an incredulous woman yells back at the robber from across the glass and metal gate.