A knife-wielding man killed two women Sunday at the Saint-Charles train station in Marseille, France, before military police killed the suspect, city police told CNN.
The incident is being treated as a terror attack and has been handed over to a special prosecutor in Paris, according to the prosecutor's office.
Authorities are investigating whether the suspect had links to terror organizations.
Amaq, ISIS' media wing, issued a statement on social media late Sunday calling the attacker a "soldier of the Islamic State."
The statement issued in Arabic said the attacker "implemented the operation as an answer to the call of targeting the coalition countries." France is a member of the US-led coalition battling ISIS in Syria and Iraq.
ISIS did not name the attacker or provide evidence that he was linked to the terror group.
The attacker was not carrying any identification, Marseille police said, but French Interior Minister Gérard Collomb said during a news conference that "The attacker had several identities."
Appearing on CNN affiliate BFM, Collomb said witnesses heard the attacker shout, "Allahu Akbar" -- or, "God is the greatest" -- and that the investigation was continuing.
Surveillance footage showed the suspect attack his first victim, run away and come back to stab the second woman, the minister said. The suspect then ran toward soldiers arriving on the scene, Collomb said.
"Again we measure the devotion and the exceptional engagement of our troops. They have my honors," Collomb said in a tweet.
The Saint-Charles station is the same one where four Americans studying abroad fell victim to acid attacks last month. The Boston College students, three of whom were studying in Paris and one in Copenhagen, were treated for burns and released.
That attacker was a 41-year-old mentally unstable woman, police said. She was arrested and hospitalized, according to BFM.
There was no reason to believe the acid attacks were terror-related, police said.