Tributes flooded in Saturday for a French policeman who died after offering himself in exchange for a hostage held by an Islamist gunman in a supermarket siege, with President Emmanuel Macron hailing him "a hero".
Lieutenant-Colonel Arnaud Beltrame, 44, was shot and stabbed after taking the place of a woman whom assailant Radouane Lakdim had been using as a human shield during Friday's attack in the southwestern town of Trebes.
Beltrame died of his wounds early on Saturday, becoming the fourth victim in the shooting spree claimed by the Islamic State group.
Following the worst jihadist attack of his presidency, Macron praised the elite officer, saying he "died a hero" and deserved "the respect and admiration of the whole nation".
The president's office announced a national tribute would be held for Beltrame, without giving further details.
It added that Macron had summoned to a meeting later this week the security services responsible for monitoring individuals suspected of radicalisation.
Lakdim, 25, had been placed on a watchlist, but authorities concluded the Moroccan-born French national did not pose a threat.
World leaders paid homage to the slain officer, with British Prime Minister Theresa May tweeting that his "sacrifice and courage will never be forgotten".
US President Donald Trump denounced the "horrible attack".
Beltrame's brother Cedric said the policeman would have known all too well the risk he was taking. "He certainly knew he didn't stand a chance," he said. "He gave his life for another."
Lakdim was armed with a gun, knife and homemade explosive devices, a security source said.
The 25year old had already killed the supermarket's butcher and a customer before shooting Beltrame, prompting police to move in and kill the attacker.
Earlier on Friday, the gunman hijacked a car in nearby Carcassonne and shot the two people inside, killing the passenger and leaving the Portuguese driver in a critical condition. He also shot and wounded a police officer out jogging.
The attacker's partner and a 17-year-old friend were in custody as investigators sought to understand events leading up to the attack.
Investigators found notes at Lakdim's home which referred to ISIL, a legal source said, including a hand-written letter in which he claimed allegiance to the jihadist group.
The shootings come as France remains on high alert following a string of deadly attacks that have killed more than 240 people since 2015.
Lakdim fit a familiar profile as a petty criminal who had turned to extremism. A small-time drug-dealer, his rap sheet included convictions for carrying a banned weapon and for drug use. He spent a month in jail in 2016.
"He had been on a watchlist for his radicalisation and links to the Salafist movement," said top anti-terror prosecutor Francois Molins.
Lakdim burst into the supermarket "shouting 'Allahu Akbar' [God is great] and saying he was a soldier of the Islamic State, ready to die for Syria", Molins said.
He further demanded the release of certain prisoners – notably, according to a security source, Salah Abdeslam, prime suspect in the November 2015 Paris terror attacks.
Experts said the assault showed the evolving nature of the ISIL threat, seeking to inspire lone-wolf attacks as its self-proclaimed "caliphate" in Syria and Iraq crumbles.
"The persistence of the homegrown threat has largely escaped public debate in comparison to concern over jihadists coming home after fighting in Syria and Iraq," said Middle East expert Jean-Pierre Filiu.
France has suffered a series of major terrorist attacks over the past three years, including the November 2015 attacks that killed 130 in Paris.
A state of emergency was only lifted in October and thousands of troops continue to patrol the streets under an anti-terror operation.
Police union Synergie noted that France's security forces have become "particular targets for supporters of this deadly extremist ideology".
Beltrame is the ninth police officer or soldier to be killed since 2012 by jihadists in France, a country which is part of the US-led coalition fighting IS.
Married with no children, he was due to celebrate his civil marriage with a religious wedding this year.
Beltrame's mother said she was unsurprised her son would put others' lives before his own. "He was always like that – he's someone who ever since he was born did everything for his country," she told RTL radio.
The attack has rocked Trebes, a town of 5,000 located on the picturesque Canal du Midi.
Supermarket boss Samia Menassi, whose store remains closed and surrounded by police tape, was still in shock Saturday as she recalled hearing the first gunshots. "I said to the girls, 'Call the police, there's a terrorist in the shop'," she told AFP. "We felt powerless because we still had colleagues in there."
Of around 50 people in the store at the time, most were able to get out through an emergency exit, some after sheltering in a meat refrigerator.