TREBES, France -- A French policeman who was shot by a gunman Friday after swapping himself for a hostage in a siege at a supermarket in the southwest town of Trebes is being praised as a hero. The policeman was among a group of officers who rushed to the scene after the attacker, who claimed allegiance to the Islamic State of Iraq and Syria (ISIS) group, stormed the store and fired on shoppers and staff before taking them hostage.

The suspect, identified as 26-year-old Redouane Lakdim, shot dead two people at the supermarket after earlier opening fire on passengers in a car, killing one of them, and injuring a police officer in nearby Carcassonne.

"Everything leads us to believe it is a terror attack," said French President Emmanuel Macron.

Get Breaking News Delivered to Your Inbox

Speaking at the scene, Interior Minister Gerard Collomb said a police team immediately intervened after the start of the siege at around 11 a.m. "They managed to get some of the people out," he said, but the attacker kept one hostage back as a human shield.

A senior officer then offered to take the hostage's place and remained holed up with Lakdim while negotiations to end the standoff continued. Collomb said the officer "left his telephone on the table," allowing police to listen in as they surrounded the building.

"When we heard shots the GIGN (an elite police force) intervened," the minister said, adding that the policeman was "seriously injured."

The officer was later identified as Col. Arnaud Beltrame.

Lt. Col. Arnaud Beltrame La Manche Libre

Collomb praised the officer for his "courage" and "act of heroism."

An officer from the police SWAT team was also hurt in the operation. The gunman was killed.

Law enforcement officials said Lakdim was known as a petty criminal but had no previously known ties to terrorism. He was from Carcassonne, where the attacks started.

"He was known for petty crimes. We had monitored him and thought there was no radicalization," Collomb said.

Over the course of his rampage Lakdim killed three people and injured at least three others, officials said. The injured included the driver of the hijacked car as well as a police officer who was shot and wounded while out jogging with colleagues in Carcassonne.