Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A French police officer who volunteered to trade places with a hostage during a terror attack involving a standoff in a supermarket has died of his injuries, France's interior minister said Saturday local time.

French Interior Minister Gérard Collomb said on Twitter Saturday morning that the lieutenant colonel who was seriously injured, Arnaud Beltrame, died.

"France will never forget his heroism, bravery and sacrifice," Collomb said in the tweet.

In a statement released later Saturday morning, a spokesperson for French President Emmanuel Macron said that Beltrame "died in the service of the nation, to which he had already brought so much. By giving his life to put an end to the murderous armed jihadist terrorist, he has fallen as a hero."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Paris Prosecutor Francois Molins has said that a lieutenant colonel offered to trade places with a hostage. The officer managed to surreptitiously leave his cellphone on so that police outside could hear what was going on inside the supermarket, the Associated Press reported.

The 25-year-old suspected attacker stole a car, opened fire at police and then took hostages before he was fatally shot on Friday, authorities said. Three other people were killed and more than a dozen others were wounded in the attack, according to officials. Beltrame's death raises the total of those killed in the attack to four.

Police overpowered the assailant at a Super U store in Trèbes, about 8 miles southeast of Carcassonne and 60 miles north of the Spanish border.

Collomb previously identified the slain suspect as Redouane Lakdim, who he said acted alone.

The Paris Prosecutor's office confirmed to NBC News on Saturday that "an individual was placed in custody overnight for association with a terrorist criminal." Another individual was arrested on Friday in connection to the case. They will be held and questioned for up to four days, when investigators will decide whether they should be released or charged.

The killings began at around 10:30 a.m. local time on Friday (5:30 a.m. ET), when police say Lakdim attacked two people and stole a car, leaving the passenger dead and the driver injured.

As he drove away, Lakdim came across four riot police officers who were out jogging. He fired at them, wounding one in the shoulder, before taking hostages in a nearby grocery store, where he killed two more people, police have said.

Officers then shot and killed Lakdim after storming the supermarket, Collomb said earlier.