A French policeman who was shot by an Islamist gunman when he swapped himself for a hostage in a supermarket siege has been hailed as a hero after the attacker was killed.
The officer was among an elite team that rushed to the scene when the assailant - who claimed allegiance to the Islamic State group - stormed the store in the south-west town of Trebes, firing on shoppers and staff before taking a number of hostages.
The gunman was identified as 26-year-old Redouane Lakdim, a petty criminal of Moroccan origin.
He shot dead two people at the supermarket and injured a dozen more after earlier shooting at passengers in a car, killing one, and injuring a police officer in nearby Carcassonne.
Lakdim, who was killed in the police assault after around four hours, reportedly shouted "Allahu Akbar" - "God is greatest" - as he burst into the Super U store. He is said to have demanded the release of Salah Abdeslam, the prime suspect in the 2015 Paris attacks.
Officials believe he acted alone, and although he had been monitored, police "thought there was no radicalisation".
Lakdim was described by a neighbour as a "pleasant young man" who lived with his parents and sisters, taking the youngest children to school every day.
Speaking later outside the store, the French Interior Minister, Gerard Collomb, described how police intervened immediately after the siege started at around 11am. "They managed to get some of the people out," he said, but the attacker kept one hostage back as a human shield.
A senior police officer, a 45-year-old police lieutenant-colonel, then offered to take the hostage's place and remained holed up with Lakdim while negotiations to end the stand-off continued.
The unnamed officer, who volunteered to swap his place with the civilian, managed to leave his mobile phone switched on so his colleagues outside could hear his conversation with the attacker.
Mr Collomb paid tribute to the "heroism" of the lieutenant-colonel, who was seriously injured when he sustained a bullet wound during the assault in which the hostage taker was shot dead by police.
Mr Collomb said because the officer inside had kept his mobile phone on he was able to retain contact with police outside the supermarket as the stand-off developed. The minister added that elite forces stormed the store and killed the gunman after hearing gunshots inside.
He did not say how or when the police officer was injured.
"When we heard shots, the GIGN - a specialist police tactical unit - intervened," Mr Collumb said, adding that the policeman was "seriously injured" during his "act of heroism".
An officer from the police Swat team was also hurt in the operation to kill the gunman.
Over the course of his rampage, Lakdim killed three people and injured at least three others.
The injured included the driver of the hijacked car as well as a police officer who was out jogging with colleagues in Carcassonne.
The French government is treating the incidents as an attack, with President Emmanuel Macron saying "all evidence suggests" the shootings are terrorism.