A man wielding a butcher knife and shouting “God is great” in Arabic stabbed two ​young ​women to death — slitting one’s throat — outside a French train station before being shot dead by soldiers Sunday morning.

​The Paris prosecutor’s office launched a terrorism investigation into the killings in Marseilles. Hours later ISIS claimed the attacker was its “soldier.”

The unidentified terrorist struck ​his victims — who were just 17 and 20 — ​at the Gare Saint-Charles train station​, cutting one’s throat and stabbing the other in the chest and stomach.​

​He crept up behind his unsuspecting first victim, a witness named Dominique said, according to The Telegraph.

“She couldn’t have seen a thing,” she said.

French Interior Minister Gerard Collomb said the man seemed to be fleeing after killing his first victim but turned around and attacked the second woman while again shouting “Allahu Akbar (God is great).

He then rushed towards Operation Sentinelle soldiers responding to the scene and they gunned him down. The soldiers have been stationed around key sites in France am

id an ongoing state of emergency called to combat increasing terror attacks.

“We have until now managed to avoid such dramatic incidents,” said Marseilles Mayor Jean-Claude Gaudin. “I think it was a terrorist attack and the individual who was killed seems to have had several identities.”

Officials are not revealing the victims’ names — or that of the attacker, except that he is in his 30s and has a police record for several petty crimes, Collomb said.

The Islamic State terror group claimed responsibility for the attack Sunday evening.

French president Emmanuel Macron tweeted that he was “deeply outraged” by the “barbaric” act.

Four American university students were splashed with acid at the same Marseilles train station last month, but it wasn’t considered a terror act.

With Post wires