French police officers and emergency service members work at a supermarket during an incident in Trebes. Photo / AP
Three people were killed in southwestern France when a gunman held up a car, opened fire on police and then took hostages in a supermarket, screaming "Allahu Akbar".
Police later stormed the supermarket in the small town of Trebes and the attacker was killed, Interior Minister Gerard Collomb told reporters on site on Friday.
The attacker was known to authorities for petty crimes but was not considered an Islamist threat, Collomb said, adding that he was believed to have acted alone.
More than 240 people have been killed in France in attacks since 2015 by assailants who pledged allegiance to Islamic State or were inspired by the group. IS claimed responsibility for Friday's attack but offered no details.
"He was known for petty crimes. We had monitored him and thought there was no radicalisation," Collomb said, before adding:
"He was known for possession of drugs, we couldn't have said that he was a radical that would carry out an attack."
Collomb said three people were wounded.
He said that before the attacker seized hostages he killed one person with a bullet in the head while stealing a car, in the nearby historic town of Carcassonne.
He then shot at police officers before taking hostages at the supermarket.
President Emmanuel Macron said the incident appeared to be a terrorist attack and security forces were securing the area.
Trebes Mayor Eric Menassi told LCI TV that the man had entered the Super-U supermarket screaming "Allahu Akbar (God is greatest), I'll kill you all!"
BFM TV reported that he claimed allegiance to IS.
Collomb said the man had demanded the release of Salah Abdeslam, the prime surviving suspect in the IS attacks that killed 130 people in Paris in 2015.
Abdeslam, a French citizen born and raised in Brussels, went on trial in Belgium last month.
He is accused of "attempted murder in a terrorist context" over a Brussels shootout in March 2016, four months after he fled Paris on the night of the carnage during which his brother was among the suicide bombers.
At around 11am local time on Friday, the gunman first held up a car, killing one person and wounding another.
Then he fired on police officers in Carcassonne, a town that is a UN World Heritage site and a major French tourist attraction.
He wounded an officer in the shoulder before heading to Trebes about 8km to the east, where two more people died.