By Brian Love and Sybille de La Hamaide
PARIS (Reuters) - France was in mourning on Saturday for a French security officer who died from gunshot wounds after voluntarily taking the place of a female hostage during a supermarket siege by an Islamist militant.
Arnaud Beltrame, 44, a gendarme who once served in Iraq, had been raced to hospital fighting for his life after being shot by the gunman during the siege at the Super U store in the southwestern town of Trebes near the Pyrenees mountains.
His actions were described as heroic by politicians across the political spectrum and calls for a national tribute increased on social media networks.
"He fell as a hero, giving up his life to halt the murderous outfit of a jihadist terrorist," President Emmanuel Macron said in a statement shortly before dawn on Saturday.
Friday's attacker was identified by authorities as Redouane Lakdim, a 25-year-old Moroccan-born French national from the city of Carcassonne, not far from Trebes, the tranquil town of about 5,000 people where he struck on Friday afternoon.
Lakdim was known to authorities for drug-dealing and other petty crimes, but had also been under surveillance by security services in 2016-2017 for links to the radical Salafist movement, Paris prosecutor Francois Molins said on Friday.
The attacker, whose rampage began when he fired on a group of police joggers and also shot the occupants of a car he stole, killed three people and injured 16 others on Friday, according to a government readout.
Beltrame's death took the number killed to four.
He was part of a team of gendarmes who were among the first to arrive at the supermarket scene. Most of the people in the supermarket escaped after hiding in a cold storage room and then fleeing through an emergency exit.
He offered to trade places with a hostage the attacker was still holding, whereafter he took her place and left his mobile phone on a table, line open. When shots rang out, elite police stormed the building to kill the assailant. Police sources said Beltrame was shot three times.
Politicians from the left and right called Beltrame a "hero" on Twitter, including opposition leader Laurent Wauquiez, far-right National Rally party leader Marine Le Pen and Olivier Faure, set to become the next Socialist party head.
#ArnaudBeltrame was a trending topic on the social network where people expressed their respect and gratitude for the officer, and thoughts for his wife. Several cities, the National Assembly and police stations lowered their flags in his honor.
The Grand Mosque of Paris, the largest in the country, said the Muslim community joined in mourning for a man who had "fallen heroically under the bullets of the terrorist Redouane Lakdim in the exercise of his mission."
British Prime Minister Theresa May hailed Beltrame's courage and sacrifice on Twitter, saying they would never be forgotten.
Police arrested two people as part of the investigation into the attack, one of them a woman connected to Lakdim, on Friday and a 17-year-old man said to be one of his friends overnight, judicial sources said.
Searches at the attacker's home showed notes referring to Islamic State that appeared to be a will, as well as a phone and a computer, judicial sources said.
Investigators also found three improvised explosive devices, a 7.65 millimeter handgun and a hunting knife in the supermarket, the source said.
The Islamic State (IS) militant group claimed responsibility for the attack. Macron said security services were checking the claim.
U.S. President Donald Trump condemned "the violent actions of the attacker and anyone who would provide him support."
"We are with you @EmmanuelMacron!" he added on Twitter.
More than 240 people have been killed in France in attacks since 2015 by assailants who either pledged allegiance to Islamic State or were inspired by the ultra-hardline group.
France is part of a group of countries whose warplanes have been bombing Islamic State strongholds in Iraq and Syria, where in recent months IS has lost much of a self-proclaimed "caliphate" of territory it seized in 2014.
One multiple attack by Islamist gunmen and suicide bombers killed 130 people in Paris in November 2015 while another killed close to 90 when a man ran a truck into partying crowds in the Riviera seaside city of Nice in July 2016.
Beltrame was a qualified parachutist who served in Iraq in 2005. He also worked as part of the elite Republican Guard that protects the presidential Elysee Place offices and residence in Paris, Macron said.
Friday's assault was the first deadly Islamist attack in France since October 2017, when a man stabbed two young women to death in the port city of Marseille before soldiers killed him.
Several attacks over the past year or more have targeted police and soldiers deployed in big numbers to protect civilians and patrol sensitive spots such as airports and train stations.
The news of Beltrame's death was first announced by France's interior minister, who said in a Twitter post: "Dead for his country. France will never forget his heroism, bravery and sacrifice."
(Additional reporting by Emmanuel Jarry; Editing by Mark Heinrich and Helen Popper)