PARIS (Reuters) - France will pay a national tribute to a security officer who died from gunshot wounds after voluntarily taking the place of a female hostage during a supermarket siege by an Islamist militant, President Emmanuel Macron said on Saturday.

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.

“He fell as a hero, giving up his life to halt the murderous outfit of a jihadist terrorist,” Macron said in a statement shortly before dawn on Saturday.

Macron said France would organize a national tribute in Beltrame’s honor, the president’s office announced after he met with members of the government and officials involved in the attack investigation. It gave no further details.

The 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.

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’s rampage began when he shot the occupant of a car he stole and fired on a group of police joggers, wounding one. He then headed to a supermarket where he killed two people, an employee and a client, bringing Friday’s toll to three dead and 16 injured, according to a government readout.

Beltrame’s death took the number killed to four.

Slideshow ( 7 images )

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 shop 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.

ARRESTS AND SEARCHES

The Islamic State militant group on Friday claimed responsibility for the attack.

Slideshow ( 7 images )

Several hundred investigators devoted to the inquiry were still checking the claim on Saturday and looking into possible complicity the “terrorist” could have benefited from to carry out his attacks, the president’s office said.

Police arrested two people as part of the investigation - on Friday a woman connected to Lakdim, and overnight a 17-year-old male said to be one of his friends, 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-millimetre handgun and a hunting knife in the supermarket, a source said.

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.