A gun-wielding extremist unleashed bloodshed in a quiet corner of southern France, killing three people as he hijacked a car, opened fire on police and took hostages in a supermarket.
The 26-year-old attacker, who called himself a "soldier of Islamic State" when he entered the supermarket, was killed as police stormed the store with the help of an officer who had switched places with a hostage and suffered life-threatening wounds - one of 16 people injured.
The Islamic State group claimed responsibility for the rampage near Carcassonne and the town of Trebes. It was the deadliest attack in France since Emmanuel Macron became president last year.
The officer who offered to be swapped for a female hostage was identified as Arnaud Beltrame.
He managed to surreptitiously leave his phone on so that police outside could hear what was going on inside the supermarket - and crucially, decide when to storm it.
"He saved lives," Mr Macron said.
Mr Macron said investigators will now focus on establishing how the gunman, identified as Redouane Lakdim, obtained his weapon, and how he became radicalised.
He was known to police for petty crime and drug-dealing and was under surveillance - but not suspected of extremist links.
The hours-long drama began when the attacker hijacked a car near the medieval city of Carcassonne on Friday morning, killing one person in the car and injuring the other, according to French interior minister Gerard Collomb.
Lakdim then fired six shots at police officers who were on their way back from jogging near Carcassonne, said Yves Lefebvre, secretary general of the SGP Police-FO police union.
The police were wearing athletic clothes with police insignia.
One officer was shot in the shoulder but the injury was not serious, Mr Lefebvre said.
Lakdim then went to a Super U supermarket in the nearby small town of Trebes, 60 miles south east of Toulouse, shooting and killing two people in the market and taking an unknown number of people hostage.
Special police units converged on the scene while authorities blocked roads and urged residents to stay away.
Police were able to evacuate some shoppers at the supermarket.
Mr Collomb said two other officers were wounded during the assault.
"He acted alone, there was no-one else but him," Mr Collomb said, speaking from Trebes.
During the standoff, Lakdim requested the release of Salah Abdeslam, the sole surviving assailant of the November 13 2015 attacks in Paris that left 130 people dead, the minister added.
He said Lakdim was a petty criminal and small-time drug dealer who had been under police surveillance, but it was not clear to authorities that he was a committed radical.
"It was more of a petty criminal who at a certain moment decided to act," Mr Collomb said.
A customer in the supermarket described the assailant as a "very agitated man shouting several times 'Allahu akbar!'"
Christian Guibbert told reporters "we heard an explosion, well, several explosions. So I went to see what was happening and I saw a man lying on the floor and another person, very agitated, who had a gun in one hand and a knife in the other one".
Mr Guibbert said he had sought shelter with his wife, sister-in-law and other customers in the butcher's refrigerator.
Then he went back into the supermarket's main room and walked towards the assailant, calling police and describing the situation.
He said the suspect "ran after me".
Mr Guibbert escaped out of an emergency market door as elite police forces arrived to storm the building.
The IS-linked Aamaq news agency said the attacker was responding to the group's calls to target countries in the US-led coalition carrying out air strikes against IS militants in Syria and Iraq since 2014.
France has been repeatedly targeted because of its participation in the air strikes.
: An armed man took hostages in a supermarket in southern France, killing three people and injuring about a dozen others before being shot dead when French police stormed the market, authorities have said.
French President Emmanuel Macron said all evidence suggested that it was a terror attack - the first one since he became president in May.
It is unclear how many victims there are overall, said Yves Lefebvre, secretary general of the SGP Police-FO police union.
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.
The police were not in uniform but were wearing athletic clothes with police insignia.
Former security analyst at the French Foreign Office, Anne Giudicelli explains how the police will investigate following the fatal attack pic.twitter.com/H9UVSA6YA1— SkyNews (@SkyNews) March 23, 2018
One police officer was shot in the shoulder but the injury was not serious, Mr Lefebvre said.
The suspect then went to a Super U supermarket in the nearby small town of Trebes, 60 miles south east of Toulouse, taking an unknown number of people hostage.
In an hours-long standoff, special police units converged on the scene and authorities blocked roads and urged residents to stay away.
Police then stormed the supermarket.
Interior minister Gerard Collomb confirmed that the attacker had been shot dead and three other people were killed.
Mr Collomb went to Trebes after talking with Mr Macron, who was at an EU summit in Brussels.
The Paris prosecutor's office said counter-terrorism investigators were taking over the probe but did not explain why.
Unconfirmed media reports said the assailant claimed connections to Islamic State.
Mr Collomb identified the suspect as Redouane Lakdim, 26, a petty criminal and small-time drug dealer who he said was radicalised and under police surveillance.
The minister said that during the standoff Lakdim requested the release of the sole surviving assailant of the November 13 2015 attacks in Paris that left 130 people dead.
France has been on high alert since a string of Islamic extremist attacks in 2015 and 2016 that killed more than 200 people.
The shootings occurred in a normally quiet part of France, where the main tourist attraction is the treasured old city of Carcassonne, its medieval walls and its summertime festivals.
Mr Macron said he will be back in Paris within hours.
The attack poses a new challenge to his leadership as he also faces nationwide strikes and criticism of his reforms.
Standing next to Mr Macron, German Chancellor Angela Merkel expressed her sympathy with those affected by the hostage-taking.
"When it comes to terrorist threats, we stand by France," she said.
: Two people have been killed and about a dozen wounded in a shooting and hostage-taking in a supermarket in southern France.
It is unclear whether there are still hostages inside the shop in the town of Trebes, a spokesman with the national police service said.
A police operation to apprehend the assailant is still underway, the spokesman added.
The reason for the shooting and hostage-taking is unclear, as is the identity of the attacker.
The Irish Embassy in Paris says it's aware of an incident in the town of Trebes.
It says anyone with concerns about Irish citizens should contact the embassy in Paris on 33 1 44176700 or the Department of Foreign Affairs on 01 4082000.
: French prime minister Edouard Philippe has said a shooting and hostage-taking in southern France "seems to be a terrorist act".
A suspect has shot dead one person and seriously wounded another inside a supermarket in the southern French town of Trebes, a police union official said.
The suspect earlier fired six shots at police officers who were on their way back from jogging near the city of Carcassonne on Friday morning, according to Yves Lefebvre, secretary general of the SGP Police-FO union.
One police officer was injured in the shoulder but is not in a life-threatening condition, Mr Lefebvre said.
The police officers, based in the southern city of Marseille, were on a temporary mission in Carcassonne, he said.
French President Emmanuel Macron has asked interior minister Gerard Collomb to go to the site of the incident.
Anti-terror prosecutors have taken over the investigation.
: A hostage-taker has killed at least one person inside a supermarket in southern France, a police union official said.
A police operation is taking place in a small town in southern France after a police officer was shot and wounded.
A suspect has been surrounded at a supermarket in the town of Trebes, south of Toulouse, and might have taken hostages, national police said.
The French interior ministry said on its Twitter account that police and rescue operations are the priority.
What we know so far about hostage situation in #Trèbes, France:— BBC Breaking News (@BBCBreaking) March 23, 2018
- Elite police surrounding Super U shop, gunman inside
- Shots fired at policemen earlier, wounding one
- Gunman "claims to be in Islamic State group"
Latest: https://t.co/cABeHf80xK pic.twitter.com/6McLy3uTqm
Authorities in the Aude region are warning people to avoid the area around the supermarket.
Reuters is reporting that a man is holding hostages and he is claiming allegiance to Islamic State.