Police stand over a body after a man stabbed two women to death on Sunday at a train station in Marseille, France.
Paris CNN  — 

A man who stabbed two women to death at a train station in the French city of Marseille on Sunday had several registered identities.

Paris prosecutor Francois Molins told journalists Monday that the man had been linked to seven names through digital fingerprints.

The man was shot dead by military police after carrying out the stabbings at the Saint-Charles train station, in what authorities are treating as a terror attack.

A French police officer cordons off Marseille's Saint-Charles train station on Sunday.

The last identity listed for the attacker was Ahmed H., a Tunisian national, Molins said.

The attacker used the different identities in the years 2005 to 2017. He had been picked up by authorities in Lyon, France, on September 29 for shoplifting.

Molins described how the attacker stabbed one woman several times with a 20-centimeter knife. He ran away and then returned to attack the second woman.

He said a passer-by tried to intervene before the attacker moved towards police, who shot him dead.

Another small kitchen knife and a mobile phone were found on the attacker, Molins said, adding that he was known to have consumed hard drugs.

Amaq, ISIS’ media wing, issued a statement on social media late Sunday calling the attacker a “soldier of the Islamic State.” ISIS did not name the attacker or provide evidence that he was linked to the terror group.

While the incident is being treated as a terror attack, authorities are now investigating whether the suspect had links to established terror organizations.

CNN’s Angela Dewan wrote from London.