PARIS - About 50 people where inside the Super U supermarket in the French town of Trebes when Moroccan-born gunman Redouane Lakdim burst in shouting and then started firing.
Shoppers fled for their lives, some heading for emergency exits. About 20 people found refuge in its cold storage room, witnesses said.
Others were held hostage by Lakdim, 25, during the three-hour ordeal.
"I was five metres away from him," the store's security guard said, speaking on condition of anonymity. "He shot at me twice." Luckily for the security guard, "he shot badly," Agence France-Presse reported.
One supermarket worker said shoppers escaped from the building after the gunman burst in. "I was in my department when I heard gunshots. I went to the area of the gunshots and came face to face with the person," Reuters quoted the employee, who gave his name only as Francois, as saying.
"He raised his gun and fired, I ran away, he shouted 'Allahu Akbar' and spoke about the Islamic State. I then evacuated the clients, about 20, who were in my area and we went quietly out of the back," said Francois, who has been employed at the supermarket since November.
Another witness, former policeman Christian Guibbert, told media that he led his wife and sister-in-law and nearby customers into the meat locker. Then he went back to see where the assailant was and called police.
"I took cover because he ran at me after he spotted me. I don't know if he didn't have any bullets left or something like that. He ran after me and when I turned around, he was no longer there."
"I managed to get out through an emergency exit," he told French BFM TV in an interviewed carried by the BBC.
Another witness, an employee of the supermarket's butcher department identified only by his first name, Jacky, told Europe 1 radio he "heard people shouting and a big 'boom'," the Associated Press reported.
"It was a gunshot," he said. "Then a second gunshot. After that, my colleagues came toward me saying: 'Come on Jacky, we need to leave! There's someone who's firing shots, he's shouting "Allahu akbar", and he's shot people and he's shooting at everything.'"