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.
The two victims - one aged 17 and the other 20 - suffered gory injuries, two police sources said, saying one had her throat slit while the other was stabbed in the stomach.
Some 200 police officers had cordoned off the area and all roads were closed to traffic, with security forces saying the operation was still ongoing.
The Paris prosecutor opened a counter-terrorism probe.
French President Emmanuel Macron expressed his outrage at the Marseille attack on his Twitter account, and praised the reaction of the security services, including the Operation Sentinelle soldiers set up to deal with such threats.
"I hail the Operation Sentinelle soldiers and the police forces who reacted with extreme calmness and efficiency," Macron wrote on Twitter.
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 Frances Sentinelle force who were patrolling in the area arrive on the public square at the Gare Saint-Charles station.
Two police sources said the attacker had been carrying a butchers knife, was around 30 years old and of North African appearance. One of the sources said no identification papers were found on him.
French Interior Minister Gerard Collomb said he was heading to the site of the attack.