Three people have been killed in southwestern France after a gunman held up a car, opened fire on police and then took hostages in a supermarket, screaming “Allahu Akbar”.
The suspect, named as Redouane Lakdim, 26, from Carcassonne, was later shot dead by police.
Lakdim was said to be French-Moroccan and was known to security services, French media reported.
France’s interior minister,Gerard Collomb, added: “He was known for petty crimes. We had monitored him and thought there was no radicalisation,” he said.
Three other people were injured during the attack.
Collomb told how a police officer took the place of one hostage and managed to leave a phone switched on next to the attacker, relaying the situation to authorities outside.
President Emmanuel Macron said the incident appeared to be a terrorist attack and security forces were securing the area.
Lakdim began at around 11am when first held up a car in Carcassonne, killing one person and wounding another.
He then fired on police officers , wounding an officer in the shoulder before heading to a Super U supermarket in Trèbes at around 11am local time, taking eight people hostage.
Carole, who was shopping at the supermarket, described how people had taken refuge in a cold room.
“A man shouted and fired several times. I saw a cold room door, I asked people to come and take shelter,” she told Franceinfo radio. “We were ten, and we stayed an hour. There were more gunshots and we went out the back door.”
The situation came to end on Friday afternoon when elite forces stormed the building.
The fast-moving situation began around 11am local time on Friday morning when the hostage taker opened fire, a source quoted by HuffPost France said.
Amid rapid developments, Trèbes mayor, Eric Ménassi, told BFM TV that there was man was alone with one police officer in the supermarket after all other hostages freed.
BFM TV reported that the hostage-taker had asked for the release of Salah Abdeslam, the only surviving suspect from the group that carried out the November 2015 Paris attacks.
The UK Prime Minister offered her condolences on Friday afternoon, tweeting: “My thoughts are with the victims of the cowardly attacks in Trèbes and Carcassonne. We stand in solidarity with our friends and allies in France, just as they always stand with us.”
France has been on high alert since attacks in Paris in November 2015, in which 130 were killed. A state of emergency alert for the country was lifted in October 2017.
Terror timeline: France’s recent history of attacks
More than 240 people have been killed in France in attacks since 2015 by assailants who pledged allegiance to, or were inspired by, Islamic State.
January 2015 - Charlie Hebdo Attacks
Seventeen people were killed and 22 injured after gunmen stormed the Paris offices of satirical magazine, Charlie Hebdo. At the same time a third man and associate of the two gunmen took a number of hostages at a Kosher supermarket. The gunmen pledged allegiance to Al Qaeda in Yemen and Islamic State.
June 2015 - Saint-Quentin-Fallavier Attack
Yassin Salhi decapitated his employer before unsuccessfully trying to blow up a gas factory by driving a van into gas canisters outside.
August 2015 - Thalys Train Attack
Four people were injured after a man attempted a mass-shooting on a train travelling from Amsterdam to Paris. He was taken down and subdued by French, America and British passengers on the train who were all awarded the Legion of Honour for their actions.
November 2015 - Paris Attacks
A coordinated series of shootings, grenade attacks and suicide bombings resulted in the deadliest terrorist attack in French history. 130 people were killed and over 360 injured. The highest number of deaths occurred at a rock concert at inside the Bataclan theatre where 90 people were killed. Responsibility for the attack was claimed by Islamic State.
July 2016 - Nice Truck Attack
During Bastille Day celebrations in the coastal city of Nice, Mohamed Lahouaiej-Bouhlel drove a truck through crowds on the Promenade des Anglais. 86 people died and 434 were injured.
By Chris York.
This breaking news story has been fully updated.