What happened?

A gunman went on a shooting spree in two adjacent southern French towns near the Spanish border, killing four people and injuring 15 others in three separate incidents on Friday morning.

The shooter first killed one person while hijacking their vehicle in the medieval town of Carcassonne, where he went on to shoot and injure a police officer. The attacker then drove on to Trèbes, where he stormed a supermarket at around 11 am, killing two people at the scene and taking several hostages, according to French Interior Minister Gérard Collomb.

A police raid put an end to the hostage situation in the early afternoon, with the gunman shot and killed.

An act of 'heroism'

A French police officer who volunteered to trade places with a hostage during the siege has been hailed a hero.

Lieutenant colonel Arnaud Beltrame, 44, offered to trade places with a woman Lakdim was using as a human shield.

Beltrame had a call running on his mobile phone throughout the attack to allow police units to monitor the situation inside the supermarket.

He had hoped to negotiate once all the shoppers and staff had been taken to safety, but Lakdim shot and stabbed him.

Beltrame later died of his wounds, becoming the gunman’s fourth victim.

Speaking from the Elysee presidential palace, Macron praised the “exceptional courage” of Beltrame.

"At the heart of the action, Lieutenant-Colonel Beltrame has shown exceptional coolness and illustrated the military virtues in a vivid manner, which deserves the respect and admiration of the entire nation."

Beltrame’s name was the top trend on Twitter on Saturday, with people posting their respects to the fallen officer.

Who is the gunman?

The attacker was named as 26-year-old Moroccan-born French national Redouane Lakdim, from the city of Carcassonne.

Lakdim arrived in France with his family in 1992 and was naturalised as a French citizen in 2004, when he was 12.

He was known to authorities for drug-dealing and petty crimes.

Paris Prosecutor Francois Molins said Lakdim had been listed on a police register for radicalised people since 2014 because of suspected links to local Salafist circles.

He was still under intelligence monitoring in the days leading up to the attacks, the prosecutor said.

When he was jailed in 2016, Molins said prison staff noticed no visible sign of radicalisation.

What was his motive?

French Prime Minister Edouard Philippe said the incident appeared to be terror-related, while unconfirmed reports said the gunman pledged allegiance to ISIS. ISIS has also claimed the attack but provided no evidence of a direct connection to Lakdim.

While Lakdim was considered at risk of radicalisation by security services, he had not shown any evidence of it, according to Collomb.

During the standoff, Lakdim requested the release of Salah Abdeslam, the only surviving assailant of the November 2015 attacks in Paris that left 130 people dead. However, the interior minister suggested, that Abdeslam's release was not a key motive.

Two people with links to Lakdim arrested

Paris Prosecutor Francois Molins said Lakdim's girlfriend is a radicalised convert to Islam who shouted "Allahu akbar," or "God is Great," when she was arrested following the attack on Friday.

Molins said the woman "shows all signs of radicalisation."

The woman told investigators that she converted to Islam aged 16. She denied prior knowledge of the attack, but Molins said she had posted a Quran verse online "indicating that infidels were promised to hell" just a few hours before it happened.

A 17-year-old male has also been in custody since Friday night.

The suspect was a "very good friend" of Lakdim and was under his religious influence, a witness told investigators.

He also denied any involvement in the preparation of the attacks during his questioning, Molins said.

Who are the victims?

Jean Mazières

Before the hostage-taking, Lakdim hijacked a car in Carcassonne, shooting its Portuguese driver and killing passenger Jean Mazières, a retired winemaker.

In his sixties, the married father-of-one played an active role in the local community, organising village fetes.

"He was very jolly — he loved life, he loved parties," said Marc Rofes, the mayor of nearby Villedubert, where Mazières and his family lived.

"We have lost someone who was liked by everybody."

The driver of the car remains in a critical condition.

Christian Medvès

After stealing the car and shooting and wounding a police officer who was out jogging, Lakdim drove to the Super U supermarket in Trèbes, where he killed the shop's chief butcher, Christian Medvès.

Medvès, 50, was married with two daughters, an amateur runner and one-time local political candidate.

"He was a good guy, a brave and dignified guy," Franck Alberti, Medves' longtime friend, told regional newspaper l'Independant.

"We still don't know what happened, but knowing Christian, I imagine he would have wanted to intervene," he said.

Hervé Sosna

Hervé Sosna, a 65-year-old retired builder, was at the butcher's counter when Lakdim launched the attack.

He was shot dead by the gunman.

The Trèbes local "had a huge intellectual capacity — he read an enormous amount, especially poems," his half-brother William Durand told the Depeche du Midi newspaper.

"He never asked for anything, and he was killed, just like that."

Arnaud Beltrame

The hero policeman who died of his injuries after trading places with one of the hostages, has been mourned as a hero by people around the world.

His family said they were not surprised that Beltrame, the deputy chief of the regional force of gendarmes, would put the lives of others ahead of his own.

"He was always like that — he's someone who ever since he was born did everything for his country," his mother told RTL radio.

"He would tell me, 'Mum, I do my job. That's all.'"

His brother Cedric said he would have known all too well that he "didn't stand a chance" when he entered the supermarket.

"He gave his life for another," he said.