MARSEILLE, France -- A man with a knife stabbed two women to death Sunday at the main train station in the southern French city of Marseille as he reportedly shouted "Allahu akbar!" -- an attack the Islamic State group claimed was the work of one its "soldiers."

French soldiers shot the man to death after the attacks and authorities were working to determine if he had links to Islamic extremism.

Interior Minister Gerard Collomb, who went to Marseille to meet with local authorities and troops on the scene, said police have video that shows the man attacking a woman and running away, then coming back and attacking a second woman.

The video shows the man running toward soldiers who were rushing to Marseille's Saint Charles train station. The soldiers fatally shot him and both women died of their injuries, Collomb said.

Some witnesses reported hearing the assailant shout "Allahu akbar!" Arabic for "God is great," Collomb said.

The Paris prosecutor's office, which oversees all terror cases in France, said it had opened a counterterrorism investigation into the Marseille attack.

The ISIS-linked Aamaq news agency said in a statement Sunday night that the assailant was acting in response to IS calls to target countries in the U.S.-led coalition fighting IS extremists in Syria and Iraq.

The statement did not provide details or evidence of a direct link to the attacker. France has been part of the anti-IS coalition since 2014 and has been repeatedly targeted by IS attacks.

Police sources told The Associated Press that one of the victims was stabbed and one had her throat slit. The officials spoke on condition of anonymity because they weren't authorized to speak publicly about the investigation.

Collomb declined to provide any details about the suspect or identify the victims.

Earlier this month, four American college students were attacked with acid at the same Marseille train station. French authorities said the female assailant who doused the four Boston College students was suffering from a mental illness.

French President Emmanuel Macron said he was "deeply outraged" by Sunday's "barbarous" knife attack. In a tweet, Macron paid tribute to the French soldiers who responded "with cool heads and efficiency."

The French government this month decided to maintain the military force of 7,000 soldiers that was created to protect sensitive sites after the deadly extremist attacks of 2015.

The Saint Charles train station was evacuated and closed for several hours after the attack, and Marseille police warned people to avoid the area. The train station was partially reopened in the late afternoon.

Sylvie Corbet reported from Paris. Associated Press writer Philippe Sotto contributed to this report from Paris.