MARSEILLE - Two women were stabbed to death and their assailant shot dead by soldiers in the southern port city of Marseille on Sunday in what police sources described as a "likely terrorist act."

Three police sources said the suspect had shouted "Allahu Akbar" (God is greatest) as he carried out his attack at Marseille train station. No further details were immediately available.

Police cordoned off the area.

Police cordon sealing off area outside Marseille train station after terror attack, French soldiers standing guard and police and emergency vehicles at scene, October 1, 2017. (Reuters)

France has been in a state of emergency following a spate of attacks by Islamist militants over the last two years, including attacks in Paris in November 2015 which killed 130 people. Other countries, including Britain, Germany and Belgium, have also suffered attacks using knives, guns, explosives and vehicles.

A witness told Reuters she saw a man take out a knife from his sleeve and then stab a young girl and then a second woman, shouting what could have been "Allahu Akbar."

She added that she saw soldiers from France's Sentinelle force who were patrolling in the area arrive on the public square at the Gare Saint-Charles station.

"After the attack carried out next to Marseille Saint-Charles, I am immediately going to the site of the attack," French Interior Minister Gerard Collomb said on Twitter.

French media reported that one of the women had her throat slit, while the second woman was stabbed in the stomach. Reuters could not confirm that information.

"We have generally avoided these sort of attacks in Marseille," regional president Renaud Muselier, who was speaking from the site of the attack, told BFM TV. "I think the security services responded extremely quickly. It's difficult to do more because when you see the distance between the two bodies and the attacker it's only 10 meters, so they intervened quickly."

Security forces have increasingly been targeted by militants who have carried out several knife attacks on them, most notably in June 2016, when a Frenchman who pledged allegiance to Islamic State stabbed a police commander to death outside his home and killed his partner.