All hostages have been released after a gunman on Tuesday held several people in a bar-tobacco shop in southwestern France.

The suspect, armed and wearing a motorcycle helmet, burst into the cafe at 4.15pm local time.

According to La Dépêche du Midi, the local newspaper, the suspect is "known to police" for petty crime. He is 17 years old and his first name is Yanis.

Early reports suggested he had taken five people hostage. Most on Tuesday evening said he was holding at least four people.

According to La Dépeche, all were women, including the manager and staff.

The suspect tied them up but let one woman go at 7.30pm local time, it said. The rest were released around 9pm.

The man opened fire at police twice when they tried to approach the shop in Blagnac, a town near Toulouse airport, where he is holed up, said the national daily.

Security forces cordoned off the area and local elite RAID police officers attended the scene. Others were flown in from RAID headquarters near Paris.

France's interior minister, Christophe Castaner was on his way to the scene.

Policemen have surrounded the scene and the interior minister was en route credit: PASCAL PAVANI/AFP/Getty Images

According to La Dépêche, police sources are not treating the incident as terror-related, saying they believe it may be the result of a botched armed robbery. It cited a friend of the suspect as saying he had "lost the plot".

One witness who works nearby told France Bleu radio that the suspect had "closed the shop blinds when he saw police all around."

Blagnac town hall said: "There is no suspicion of terrorism. It has not been raised."

However, Le Parisien and Le Figaro both quoted other security sources as saying the man was carrying a GoPro - the type of mobile camera that has been used by terrorists to film their attacks.

ActuToulouse news website cited one customer who it said the suspect had released as saying he had told most people in the busy bar to leave except for the four held.

"The man came in with a helmet on but his face wasn't hidden. He also had a Go-Pro-style camera on his chest. He told us it was for our own good," the unnamed witness is cited as saying.

"The man has asked for a negotiator and has threatened to kill a hostage if the security cordon is not moved back," according to the local France 3 TV.

"We have been asked to shut our shutters and to stay indoors," said a local businessman.