Christian Guibbert told reporters "we heard an explosion, well, several explosions".
He said he hid his wife, his sister-in-law and other customers in a meat locker and then called the police.
Police were able to evacuate some shoppers at the supermarket.
The suspect killed three people Friday before being shot dead by French police.
"The person who carried out the attack in Trebes in southern France is a soldier of the Islamic State and he carried out the operation in response to a call to target states" of the anti-IS worldwide coalition, the Amaq agency said in a statement on social messenging app Telegram.
Investigators said that when Lakdim began his attack, he shouted that he is a member of the Islamic State militant group.
It was referring to the USA -led coalition that has been carrying out airstrikes against IS in Syria and Iraq since 2014.
French interior minister Gerard Collomb confirmed that the attacker had been shot dead and that three other people had died.
Officials said once they heard shots inside the market they chose to storm it, killing the gunman.
Lakdim is then believed to have driven a short distance to the small town of Trèbes, where he stormed into the Super-U supermarket, shouting, "I am a soldier of Daesh [Islamic State]!"
Lakdim first killed one person with a bullet in the head while stealing a auto in Carcassonne, which is one of France's top tourist attractions.
The attacker, whose rampage began when he shot at a group of police joggers and also shot the occupants of a vehicle he stole, killed three people and injured 16 others on Friday, according to a government readout.
"Thanks to this exceptional man for his act of heroism", said right wing politician Eric Ciotti.
Prior to taking his hostages, #French Police officials say that Lakdim killed two different people at different locations before driving to Trebes.
French police block access to Trebes.
Coulibaly killed four hostages before he was shot and killed.
Indian Wells: Venus Williams, Halep suffer shock semi-final losses
Along with Osaka, Kasatkina too is having an impressive run so far. "She improving so much, so she's really unsafe player". The future is now at the BNP Paribas Open. "We are coming", Kasatkina said of the next generation of young players.
France has been on high terror alert since the attacks, which left more than 200 people dead.
"Our country has suffered an Islamist terrorist attack", President Emmanuel Macron said in a televised address.
This is the first suspected terrorist incident since Macron lifted a two-year state of emergency last autumn and toughened anti-terror laws.
Mr Collomb went to Trebes after talking with Mr Macron, who was at an European Union summit in Brussels.
He added that he was unable to give further details on the victim.
He also worked as part of the elite Republican Guard that protects the presidential Elysee Place offices and residence in Paris, Macron said.
"This attack has been claimed by ISIS, and it is now being analyzed", Macron said. Parents and relatives have been told not to come to pick them up.
Local authorities tweeted that the area was off-limits to the public.
Trèbes has today been the setting for a horrific terror-related shooting and hostage situation.
Carole, who was shopping at the supermarket, described how people had taken refuge in a cold room.
Beltrame offered to take the place of a woman Lakdim was using as a human shield while his colleagues negotiated with the gunman, the interior minister said.
The attacker first fired six shots at police officers on their way back from jogging near the city of Carcassonne on Friday morning, said Mr Lefebvre. Without naming sources, it said he was active on Salafist social networks.
Counter-terrorism prosecutors are leading the investigation.
Islamic State is also known as Isis.
French special police forces arrive to perform a search operation at the Ozanam housing estate in Carcassonne, southwestern France on March 23, 2018.
- Fatal Uber crash 'highlights challenges of autonomous cars alongside human drivers'
- Afghanistan beat Ireland to qualify for World Cup 2019
- Third front talks: Chandrashekhar Rao to meet Mamata Banerjee on Monday
- Apple Secretly Designing Own MicroLED Displays For Future Devices
- Stephen Hawking's ashes to be interred at Westminster Abbey
- Avengers: Infinity War surges past Black Panther's advance ticket sales
- North, South Korea set to hold talks ahead of major summit
- Apple Said To Begin Trial Production Of 2018 iPhones Soon
- Trump plans to hit China with $60 bn in annual tariffs
- Sehrai replaces Geelani as interim Tehreek-e-Hurriyat chairman