A stampede of terrified shoppers ran for the exits and quick-thinking employees closed store security gates Tuesday as a gunshot echoed through bustling Roosevelt Field mall.

“It was just a loud pop, and we all just kind of froze for a minute and kind of looked at each other,” said Nicole Cunniff, 25, of Glen Cove, who was working at a temporary Hugo Boss store near the scene of the shooting.

“Our manager just leaned over and said, ‘He’s got a gun.’ ”

See alsoSocial media reacts to shootingDataLI crime stats

Cunniff and her colleagues took off running, but stopped to help a mother struggling with two terrified young children.

“We got each kid,” said Julia Neveu, 25, of Brooklyn, who ran so fast she lost her shoes. “Her kids were screaming. She’s literally dragging her kids.”

Three days before Christmas, shoppers — some visibly shaken as they left the mall — said the terrorist attacks in San Bernardino, California, and Paris, and the frequency of mass shootings in public places across the country flashed through their minds as they fled.

advertisement | advertise on newsday

It turned out to be an attempted robbery at a watch store. The would-be thief was arrested at the scene, but a 67-year-old mall employee was wounded by a stray bullet, police said.

“I feared it was a nut,” said Mark White, 47, of Roslyn, who was making a purchase at an audio store at the time.

“Instead of running out, we ran to the back of the Bose store, and we locked ourselves inside,” said White, who said an employee closed the security gate after other shoppers dashed inside to hide.

“I heard a popping sound and . . . what sounded like a stand falling down or glass shattering. I looked to my right and saw 5, 6, 700 people running the opposite direction, very scared.”

White said he and other shoppers stayed in the store’s back room for more than an hour.

“It was very scary, and I said, ‘Oh boy, I hope no one got hurt and I hope no one got trampled on the way out,’ ” White said.

Fernando Nunez, who was Christmas shopping, praised an Urban Outfitters manager for quickly closing the gates.

“All of a sudden you had a whole group of people running into the store. I didn’t know what it was,” said Nunez, 53, of Brooklyn. “I heard somebody say, ‘Lock down. Let’s close the gates.’

advertisement | advertise on newsday

“It was a little scary,” he said. “These things are becoming more and more frequent.”