When shots rang out, elite police stormed the building to kill the assailant.
"His leadership skills, his willingness, his unfailing commitment were appreciated by everyone, especially in the development of counterterrorism capacity in the Aude police force", Macron said. In December, when singer Johnny Hallyday died, president Macron said that Hallyday "is part of French heroes".
Lakdim had already shot dead the supermarket's butcher and a customer when Beltrame offered to take the place of a woman he had taken hostage.
"He did what needed to be done and thanks to him, many lives were saved and yes, I think the word hero is very appropriate". Death for the Fatherland.
"He was well aware he had almost no chance".
Beltrame was a qualified parachutist who served in Iraq in 2005. In that case, the perpetrator - in a posthumously released video - also declared his allegiance to the Islamic State, but his contacts with the terrorist organization before the attack were unclear.
Also found were a 7.65-caliber handgun and a hunting knife, the official said on Saturday.
A Trebes local, Sosna "had a huge intellectual capacity - he read an enormous amount, especially poems", his half-brother William Durand told the regional Depeche du Midi newspaper.
A gendarme who voluntarily took the place of a hostage during the siege has died, France said earlier on Saturday. French security services were checking the claim's authenticity.
More than 230 people have died in a series of Islamist-inspired terror attacks in France over the past three years, including 17 in a mass shooting at the satirical magazine Charlie Hebdo in Paris in January 2015 and 130 in the Paris attacks the following November.
The hostage scenario at the supermarket also recalled a January 2015 attack on the Hyper Cacher kosher supermarket in Paris in which four people were killed.
Married with no children, he was due to celebrate his civil marriage with a religious wedding this year.
"He would have said to me, 'I'm doing my job, Mom, nothing more, '" she said.
A general view shows gendarmes and police officers at a supermarket after a hostage situation in Trebes, France, March 23, 2018. Two people remain in custody in the investigation.
Four people were killed in the hours-long attack Friday when a gunman, reportedly yelling "Allahu Akbar", went on a rampage before barricading himself inside the supermarket.
Terrorism in the name of any religion or religious ideology (Islamism, Hindutva militarism, Christian fundamentalism, Zionism, anti-Muslim Buddhist mafia) is vicious and should be fought against by all democratic forces, and we should never compromise on this because some brainwashed maniacs and social oppressors are using the names of religions or religious symbols to advance their objectives.
The news of Lt-Col Beltrame's death was first announced France's interior minister, who said in a Twitter post: "Dead for his country".
Prosecutors are reportedly questioning two people in connection with the attacks, one of whom is thought to be the gunman's partner while the other is believed to be a friend.
Most of the people in the store escaped after hiding in a cold storage room and then fleeing through an emergency exit.
He graduated in 1999 from France's top military college Saint-Cyr, where his superiors described him as someone who "fought until the end and never gave up", President Macron said. The interior minister suggested, however, that Abdeslam's release wasn't a key motive for the attack.