NEW YORK (CBSNewYork) — ISIS is claiming responsibility for an attack and hostage situation in southern France that left a suspect and three others dead.

France’s top counterterror prosecutor said the gunman yelled “Allahu akbar” (God is great) and claimed to be a “soldier of the Islamic State” during the attack.

The gunman has been identified as Redouane Lakdim, 26. He was originally from Morocco.

Police shot and killed Lakdim after he took hostages at a supermarket in the small town of Trebes Friday.

Three victims were killed and 16 injured in the attack.

French media reports say earlier in the day, Lakdim hijacked a car and killed a passenger in the nearby town of Carcassone and shot at police officers who were out for a jog. At least one officer was wounded, CBS News reported.

The suspect then drove to the town of Trebes, where he went into the supermarket and took of number of people hostage.

The gunman reportedly asked for the release of Salah Abdeslam, the only surviving suspect from the 2015 terror attacks in Paris that killed 130 people.

Most of the people inside the supermarket got out safely, but France’s Interior Ministry confirmed two people were killed inside the store, CBS News reported.

“We heard an explosion, well, several explosions,” said Christian Guibbert, who was in the market during the attack. “So I went to see what was happening and I saw a man lying on the floor and another person, very agitated, who had a gun in one hand and a knife in the other one.”

After several hours, police launched a raid, shooting and killing Lakdim.

A woman who counterterror officials say was close to him and shared a life with him has been taken into custody.

In a televised address from Belgium, French President Emmanuel Macron said “everything leads us to believe it is a terror attack.”

Macron said detectives are trying to figure out how obtained the gun and how he got radicalized. He had previously was known to police as a small-time drug dealer, Macron said.

French Prime Minister Edouard Philippe also said the information suggests the incident “seems to be a terrorist act.”

The White House says President Donald Trump has been informed of the situation.

The Eiffel Tower was to be switched off at midnight to honor those killed in the attack.