Two women, aged 17 and 20, were stabbed to death at the main railway station in Marseilles before a French soldier shot the attacker dead.
Two women were stabbed to death and their assailant shot dead by a soldier in the southern French port city of Marseilles on Sunday in what officials described as a "likely terrorist act".
Police sources said the suspect had shouted in Arabic as he carried out his attack on the women, aged 17 and 20, at Marseilles' main railway station.
Two police sources said one had her throat slit while the other was stabbed in the chest and stomach.
Daesh claimed responsibility for the attack.
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 a number of attacks that began almost two years ago.
TRT World's Nafisa Latic has more.
Paris was rocked in 2015 by multiple attacks that killed 130 people. In 2016 a gunman drove a truck into a crowd celebrating Bastille Day in Nice, killing 86 people. Both of these attacks were also claimed by Daesh.
Other countries, including Britain, Germany and Belgium, have also suffered attacks using knives, guns, explosives and vehicles.
"If the military had not been there, we would have had a lot more deaths," Samia Ghali, lawmaker for the Marseilles region, told France Bleu Province radio.
French troops are part of a US-led coalition fighting Daesh in Syria and Iraq and has thousands of soldiers in West Africa fighting Al Qaeda-linked militants, operations that have made these groups urge their followers to target France.
Some 200 police officers had cordoned off the area and all roads were closed to traffic.
Attacker known to police
Two police sources said the attacker had been carrying a butcher's knife, was around 30 years old and of North African appearance. One source said he was known to police for common law crimes.
"We have generally avoided these sorts of attacks in Marseilles," regional president Renaud Muselier, who was speaking from the site of the killings, 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 metres, 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 Daesh stabbed a police commander to death outside his home and killed his partner.
A man wielding a knife attacked a soldier in a Paris metro station on September 15.
President Emmanuel Macron said on Twitter he was "disgusted by this barbaric act" and praised the calmness and efficiency of security forces, including the military.
French lawmakers are due to vote on a much-criticised anti-terrorism law on Tuesday, which would see France come out of its state-of-emergency in November, although some of the powers would be enshrined into law.
The number of military personnel on the ground is also due to be reduced slightly, although the force is being adapted to make it more mobile and its movements less predictable.
"The presence of Sentinelle soldiers, their speed and efficiency ensured that the death count was not bigger," police union official Stephane Battaglia said.