A man with a knife killed two women at the main train station in the French port city of Marseille on Sunday, in an attack that French authorities were probing for links to Islamic extremism.
Police sources said the victims were aged 17 and 20, and that one had her throat slit while the other was stabbed in the chest and stomach.
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 almost two years ago.
"We have until now managed to avoid such dramatic incidents [in Marseille]. I think it was a terrorist attack and the individual who was killed seems to have had several identities," Marseille mayor Jean-Claude Gaudin told reporters.
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 claimed by ISIS.
Other countries, including Britain, Germany and Belgium, have also suffered attacks by militants using knives, guns, explosives and driving vehicles at crowds.
On Sunday, some 200 police officers cordoned off the area and all roads were closed to traffic.
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."
Speaking in Marseille, Interior Minister Gérard Collomb said the man had initially killed one woman and looked to be running away before returning to attack a second woman and then rush toward soldiers from the Sentinelle force who arrived on the scene quickly and shot him dead.
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, while another said digital analysis of fingerprints had come up with several aliases.
"This could be an act of terrorism, but we cannot confirm it fully at this stage," Collomb told reporters.
The Paris prosecutor's office, which oversees all terrorism cases in France, said it had opened a counterterrorism investigation of the Marseille attack. It did not provide further details, including a possible motive.
Collomb declined to provide any details about the suspect or to identify the victims. He said the assailant's "strange" behaviour of attacking, running away and then returning to strike again was "a point of inquiry."
The Islamic State-linked Aamaq news agency claimed in a statement Sunday night that the assailant was acting in response to calls to target countries in the U.S.-led coalition that's fighting ISIS militants in Syria and Iraq.
France also has thousands of soldiers in West Africa fighting al-Qaeda-linked militants, operations that have made these groups urge their followers to target France.
Security forces have increasingly been targeted by militants in knife attacks. A man wielding a knife attacked a soldier in a Paris metro station on Sept. 15.
President Emmanuel Macron said on Twitter he was "disgusted by this barbaric act" and praised the calmness and efficiency of security forces.
French lawmakers are due to vote on a much-criticized 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 in 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 Stéphane Battaglia told Reuters.With files from The Associated Press