French authorities say they believe the man who tried to attack the Louvre museum in the capital Paris on Friday was a 29-year-old Egyptian man.
Prosecutor Francois Molins said he is thought to have travelled to Paris from Dubai on a tourist visa last month.
Police are trying to establish if the man acted alone or under instructions, he added.
The machete-wielding attacker was critically injured after he was shot by French soldiers in a bid to stop him.
One of the soldiers received minor injuries when the man tried to enter the museum.
At the time of the incident, hundreds of visitors were inside the Louvre, which is home to numerous celebrated art works, including the Mona Lisa.
President Francois Hollande praised the soldiers’ actions, saying "this operation prevented an attack whose terrorist nature leaves little doubt".
He told reporters at an EU summit in Malta on Friday that he expected the suspect to be questioned "when it is possible to do so".
Prosecutor Molins said the Egyptian man had no identity papers but mobile phone data showed he had arrived in Paris on 26 January after acquiring a one-month tourist visa in Dubai.
However, he cautioned, the authorities have not yet formally established the suspect’s identity.
Egyptian security sources though say they have identified him, Reuters news agency reports.
He was believed to have been staying in the capital’s 8th district (arrondissement) which was searched in a police raid earlier on Friday.
There, he bought two machetes from a shop selling guns.
According to the prosecutor, the attacker, armed with the machetes, approached four soldiers guarding the entrance to crowded shops beneath the Louvre just before 10:00 local time (09:00 GMT).
When the soldiers challenged him, he attacked two of them while shouting in Arabic "Allahu Akbar" ("God is greatest"). One of them shot him at least three times, hitting him in the stomach.
"The attacker fell to the ground, seriously wounded. He has been taken to hospital and is fighting for his life," the prosecutor said.
He was carrying a rucksack which contained paint spray cans - but no explosives.
The guards on patrol outside the museum were just some of the thousands of troops lining the streets as part of the stepped-up response to a series of attacks in France since 2015.
Though still hugely popular, the Louvre has suffered a drop in visitor numbers amid fears of a militant attack.
A series of assaults by gunmen and suicide bombers claimed by so-called Islamic State killed 130 people in November 2015.
In January of the same year, 17 people were killed in an attack on the Charlie Hebdo magazine and linked shootings.
Last July, 86 people were killed when a lorry ploughed through crowds celebrating Bastille Day in Nice.
Security has become a theme of the French presidential election in April, which sees far-right leader Marine Le Pen and centrist independent Emmanuel Macron leading the polls.