Security forces in France have killed the gunman who took hostages earlier in the day after going on a shooting spree in southern France.
Two other people were killed in the attack carried out by the man believed to be a Moroccan who was on a watchlist of suspected Islamic extremists.
To end the three-hour stand off at the Super U supermarket in Trebes, a police officer went in to exchange himself for the hostages who were freed. He was however injured in the shootout that later occured.
The gunman had carried out three separate attacks in the medieval town of Carcassonne and Trebes.
According to AFP, the man first hijacked a car in Carcassonne, killing a passenger and injuring the driver, before shooting a policeman who was out jogging with his colleagues nearby.
He then drove to the supermarket in Trebes and holed up there for more than three hours with hostages, killing at least two people, according to sources.
A witness said the assailant was armed with knives, a gun and grenades and shouted “Allahu Akbar” before going into the supermarket.
“A man shouted and started firing several times,” one shopper at the supermarket told FranceInfo radio station.
“I saw an open door for a refrigerated area and I told people to come to shelter there,” she said.
“We were 10 people and we got out by the emergency exit at the back.”
After letting his hostages go, the gunman remained in the store with just one policeman, who along with another officer was shot and injured when anti-terror forces swooped on the building.
The killing spree came with France still on high alert after a string of jihadist attacks since 2015.
French President Emmanuel Macron paid tribute to the quick reactions of the emergency services and said he would be returning to Paris from Brussels at the end of an EU summit so he can coordinate the national response.
Three helicopters could be seen circling over Trebes, a picturesque medieval town of around 5,000 people, while heavily armed police had closed down roads surrounding the supermarket.
The local prosecutors’ office were treating the incident as a terror attack and said the gunman had claimed to be acting in the name of IS.
“All the information we currently have leads us to believe it is a terrorist act,” Prime Minister Edouard Philippe said while on a visit to Mulhouse in eastern France, cutting short the trip.
Interior Minister Gerard Collomb was on his way to the scene.
The terror attacks in France started in January 2015 with the assault on satirical magazine Charlie Hebdo that left 12 people dead.
France also suffered major attacks in Paris in November 2015 when IS jihadists killed 130 people in bombings and shootings at bars, restaurants, the Bataclan concert venue and the national stadium.
In July 2016, in another attack claimed by IS, a man drove a truck through revellers celebrating Bastille Day in the Riviera resort of Nice, killing 84 people.
A state of emergency put in place just after the Paris attacks was finally lifted in October last year, but soldiers continue to patrol major tourist sites and transport hubs under an anti-terror mission.
The attacks were the first deadly assault in France by a suspected jihadist since October, when two young women were stabbed to death outside Marseille’s main train station.
The area of southwest France where Friday’s shootings took place has been traumatised by Islamic extremism before.
In 2012, Mohamed Merah shot dead seven people including three Jewish schoolchildren in nearby Toulouse and Montauban.
With AFP reports