TREBES, France — The French police officer who swapped places with a female supermarket employee being held hostage had already received a lifetime of accolades by the time he walked unarmed into the store under attack by an extremist gunman.

Known for his courage and sangfroid, Lt. Col. Arnaud Beltrame was acclaimed by neighbors, colleagues and French authorities as a hero Saturday after his death from wounds the day before. President Emmanuel Macron announced plans for a national ceremony to formally honor him.

After agreeing to the hostage swap, Beltrame surrendered his weapon — but kept his cellphone on, allowing authorities outside the Super U market in the southern French town of Trebes to hear what was happening inside.

Thanks to Beltrame's quick thinking, special police units heard gunshots inside the store Friday and stormed the building immediately, killing the attacker.

"Beyond his job, he gave his life for someone else, for a stranger," Beltrame's brother, Cedric, told RTL radio in France. "He was well aware he had almost no chance. He was very aware of what he was doing .?.?. if we don't describe him as a hero, I don't know what you need to do to be a hero."

"Arnaud Beltrame died in the service of the nation to which he had already given so much," Macron said. "In giving his life to end the deadly plan of a jihadi terrorist, he fell as a hero."

The date of the ceremony for Beltrame was not immediately set.

The hostage whose life he saved, an employee named Julie, was in a "catastrophic state," her manager said.

Beltrame's entire career seemed to lead inexorably to the moment when he responded to the attack Friday in Trebes, a 15-minute drive from the gendarme unit he had led since last August.

He joined France's elite police special forces in 2003 and served in Iraq in 2005. A former member of the presidential guard, he earned one of France's highest honors, the Order of Merit, in 2012.

In December, Beltrame organized a counterterrorism training session for just such a hostage situation — down to the location in a supermarket. At the time, he armed his officers with paintball guns, according to the Depeche du Midi newspaper.

"We want to be as close to real conditions as possible," he said then.

In addition to the four people killed by the gunman Friday, 15 others were injured.

Investigators searched the home of the attacker, Moroccan-born Redouane Lakdim, 25, and found what a judicial official said were notes "that alluded to the Islamic State and appeared like a last testament." They also found a computer and a phone.

Inside the market itself, investigators found three homemade explosive devices, a handgun and a hunting knife, the official said. He was not authorized to speak publicly amid the investigation.

The weapons suggested an intent to do further damage.

Macron called a special Defense Council meeting with key ministers Saturday to decide the country's next steps in combating terror. Hundreds of investigators were on the case, pouring into Lakdim's background.

Across the Atlantic, President Donald Trump tweeted "We are with you @EmmanuelMacron!" and condemned "the violent actions of the attacker and anyone who would provide him support."

French police and soldiers have been a prime target of attacks by extremists, with 10 killed in recent years, including Beltrame. Dozens of others have been wounded.

Beltrame's mother told RTL radio that, for her son, "to defend the homeland" was "his reason to live."

"He would have said to me, 'I'm doing my job, Mom, nothing more,'?" she said.

Flowers piled up in front of the Gendarmerie headquarters in the French medieval city of Carcassone to pay tribute to Beltrame. Flags at all gendarmeries were flying at half-staff.

Two people have been detained in the case, one woman close to Lakdim and a 17-year-old male friend.

The four-hour drama began at 10:13 a.m. Friday when Lakdim hijacked a car near Carcassonne, killing the passenger and wounding the driver, the prosecutor said. Lakdim then fired six shots at police officers who had just finished jogging, hitting one in the shoulder.

Shouting "Allahu akbar!" — Arabic for "God is great" and declaring he was a "soldier of the Islamic State," he entered the Super U supermarket in Trebes, 60 miles southeast of Toulouse, where about 50 people were inside, Paris prosecutor Francois Molins said. He killed two people in the market and took an unknown number of hostages.