The hostage drama played out at around 8pm in a Monoprix supermarket in Lille, northern France, while the country is on high alert after recent terror attacks.
A shopper who was inside the supermarket at the time told the La Voix du Nord newspaper that an unmasked man had entered the store holding a pistol in the air.
The man, aged 19, is understood to have been attempting to rob the store.
In panic, the fifteen or so customers inside grouped together and headed to a second floor of the supermarket.
Someone was able to alert the police, who were quick to the scene.
However, it was then that the gunman took a hostage, who was reported to be a woman, although Le Parisien wrote that it was "a young girl".
With the building surrounded by police, the man eventually turned his attention from the hostage and aimed his weapon towards the police, who promptly opened fire.
A witness out on the street said they heard at least six shots.
"It was pretty unnerving to see - everyone was running down the streets," the witness told La Voix du Nord.
The shootout saw the gunman hit several times and knocked to the ground, where he was disarmed by police.
He was then taken to hospital, where he is understood to be in a stable condition.
The man's motive remains unclear. The customers, including the hostage, all escaped without injury.
Although the siege was not related to terrorism it comes as France and especially its police force are on edge after the November 13th Paris attacks and several other incidents, including a recent attempt by a lone jihadist to attack a police station in the capital.