At least three people were killed and policeman was left in serious condition in a shooting spree and hostage siege in southwest France. Sixteen people were also wounded, two critically.
A man claiming allegiance to the ISIS terrorist group carried out three separate shootings in the medieval town of Carcassonne and nearby Trebes, where he ended his rampage by taking hostages at a supermarket.
A police officer who took the place of a female hostage is "fighting for his life", French President Emmanuel Macron said in a televised address following the shootings, hailing the man as a hero.
"Our country has suffered an extremist terrorist attack," the president added.
The gunman has been identified as a 26-year-old drug dealer monitored as a possible extremist.
"We had monitored him and did not think he had been radicalized. He was already under surveillance when he suddenly decided to act," Interior Minister Gerard Collomb told reporters after flying to scene.
Named as Redouane Lakdim and said by security sources to have Moroccan nationality, the gunman first hijacked a car in Carcassonne, killing a passenger and injuring the driver, before shooting and injuring a policeman who was out jogging.
He then drove around 15 minutes to a Super U supermarket in the sleepy town of Trebes.
He killed another two people and took hostages for more than three hours, armed with a knife and a gun, according to survivors. Another witness said he had grenades.
During the stand-off with police, he asked for unidentified prisoners to be released and was finally shot by anti-terror officers when they raided the premises.
"People were in complete peace here," Collomb said in Trebes, a picturesque town of 5,000 people located along the famed Canal du Midi.
"No one could have imagined that there could be an attack."
Collomb also hailed the "act of heroism" of a local policeman who agreed to exchange himself for Lakdim's last hostage, a woman, in the final stages of the drama.
The officer was injured in the assault by France's elite anti-terror police who have been called into action on multiple occasions over the last few years during a series of jihadist atrocities.
ISIS claimed the attack was in response to its call to target its Western enemies -- as is customary when the assailant has pledged allegiance to the group.
A total of three people were killed and three people were injured by the gunman. An anti-terror policeman was also injured during the raid to end the siege.
Friday's violence took place in a part of France still scarred by a killing spree in 2012 in the city of Toulouse and nearby Montauban where another extremist, Mohamed Merah, shot dead seven people including three Jewish schoolchildren.
That assault marked the first of several big extremist attacks in France, including the January 2015 assault on satirical magazine Charlie Hebdo that left 12 people dead.
France also suffered major attacks in Paris in November 2015 when ISIS extremists killed 130 people in bombings and shootings at bars, restaurants, the Bataclan concert venue and the national stadium.
In July 2016, in another attack claimed by ISIS, a man drove a truck through revelers celebrating Bastille Day in the Riviera resort of Nice, killing 84 people.
Christian Guibert, a survivor of Friday's attack, said he saw "a man on the ground and then another very animated person who had a gun in one hand and a knife in the other.
Guibert told BFM television he hid his wife and sister-in-law in a refrigerated meat room in the supermarket and then went to alert the police.
"At that moment, he saw me and ran after me," said Guibert, a retired policeman. "I started running and lost him."