Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PARIS — Soldiers and police subdued and killed a suspected knife attacker in Marseille on Sunday after a deadly rampage in the city's main station. Police sources told NBC News that two young women were stabbed to death.

Police investigators work outside Marseille's main train station on Oct. 1, 2017, in Marseille, France. Claude Paris / AP

Police in the southern coastal city said they had "neutralized" the assailant and cordoned off the area.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The attacker was first shot by a soldier on patrol duty protecting the train station. Another police officer quickly came forward to handcuff the assailant, who had fallen to the ground from being shot. The assailant died shortly afterward at the scene.

A witness told Reuters that she heard the assailant shouting "Allahu Akbar" ("God is great," in Arabic) during the attack. Police called the incident a "likely terrorist act."

The spokesperson for the Paris Prosecutor's office confirmed to NBC News its "the anti-terrorist section" had taken over the investigation. ISIS published its customary claim of responsibility on its affiliated news outlet, A'maq News Agency, without providing any supporting evidence.

After visiting the scene, French Interior Minister Gerard Collomb tweeted that the incident was "an odious attack. A cowardly and despicable crime. My first thoughts go to the families of the victims of this tragedy."

#Marseille : après l’attaque perpétrée à proximité de la gare Saint Charles, je me rends immédiatement sur les lieux. — Gérard Collomb (@gerardcollomb) October 1, 2017

French President Emmanuel Macron tweeted that he was "deeply outraged by this barbaric act."

"My thoughts are with the families and loved ones of the victims of Marseille. I salute the military Sentinel and the police officers who responded with cold blood and efficiency," his tweet read in English.

Collomb said at a news conference that the attacker first stabbed a woman in the square of the train station, then began to run away but attacked a second person beforehand. At that moment, he was shot by the soldiers, said Collomb, who said officials would confirm whether the attack was terrorism following the investigation.

Profondément indigné par cet acte barbare, en peine avec les familles et les proches des victimes de Marseille.

Je salue les militaires de Sentinelle et les policiers qui ont réagi avec sang froid et efficacité. — Emmanuel Macron (@EmmanuelMacron) October 1, 2017

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 that killed 130 people.

A gunman drove a heavy truck into a crowd celebrating Bastille Day in the city of Nice last year, killing 86 people and injuring scores more.