Police evacuated Marseille's ornate Saint Charles station after the attack, temporarily halting all train traffic on some of France's busiest lines.

Police shut down and sealed off the station and French Interior Minister Gerard Collomb immediately went to Marseille. The victims were reportedly two cousins aged 17 and 20, with one of them having her throat slit and the other stabbed in the stomach.

French officials are studying the suspect's mobile phone and working to determine whether he had accomplices or direct links to Islamic State (IS), which claimed responsibility for Sunday's stabbings at the Saint Charles station.

France's SNCF railways body advised people to drop plans to travel to and from Marseille's train station.

Reuters adds word from witnesses, who say that the suspect shouted, "Allahu Akbar" (God is greatest) while he carried out the violence.

The assailant was shot dead by a soldier from a military Sentinelle patrol, a force deployed across the country as part of a state of emergency declared after Islamist attacks that began nearly two years ago.

The Marseille attack came only days after IS released a recording of what it said was its leader Abu Bakr al-Baghdadi urging his followers to strike their enemies in the West.

French President Emmanuel Macron wrote on Twitter that he was deeply outraged by the attack, but also praised the soldiers for acting efficiently and cool-headedly.

The Paris prosecutor's office, which oversees all terror cases in France, said it had opened a counterterrorism investigation into the Marseille attack. France has been part of the anti-IS coalition since 2014. Molins did not confirm or deny any suspected involvement by Islamic State.

The minister continued that the assailant ran toward soldiers who were rushing to the scene and was shot just outside the station.