Jacky Naegelen / Reuters A French soldier wounded a man armed with a machete after he tried to enter the Louvre museum in Paris.

PARIS (Reuters) - A French soldier shot and wounded a man armed with a machete and carrying two bags on his back on Friday as he tried to enter the Paris Louvre museum in what police said looked like a terrorist attack.

The man shouted Allahu Akbar (God is greatest) and attacked another soldier before being shot near the museum’s shopping mall, police said, adding a second person had also been detained after acting suspiciously.

The attacker was alive but seriously wounded, the head of Paris police Michel Cadot told reporters at the scene, adding the bags he had been carrying contained no explosives.

“The soldier fired five bullets,” Cadot said, describing how the man hurried threateningly towards the soldiers.

“It was an attack by a person... who represented a direct threat and whose actions suggested a terrorist context.”

Tourists told to sit on ground in locked halls inside the #Louvre pic.twitter.com/Ux1PTh4gbs — Wang Feng (@ulywang) February 3, 2017

Friend sends pic from inside the #Louvre , tourists being evacuated into locked down halls pic.twitter.com/1UxMkBsmPJ — Wang Feng (@ulywang) February 3, 2017

An anti-terrorism inquiry has been opened, the public prosecutor said in a statement.

The identity and nationality of the attacker remains unknown for now, French Interior Ministry spokesman Pierre-Henry Brandet told reporters.

France has been hit by a series of militant Islamist attacks over the past two years that have killed more than 230 people, and which have been claimed by the militant Islamist group Islamic State.

The country is less than three months away from a presidential election in which security and fears of terrorism are among the key issues. It has been living under a state of emergency since November 2015.

Paris was also planning to submit its official bid to host the 2024 Olympic Games on Friday with a launch show at the Eiffel Tower around 1730 GMT.

The most recent deadly attack took place in the southern city of Nice when a man drove a truck into a crowd on the seafront killing 86.

In September, in an attempted attack, a group of women parked a car containing gas canisters near Paris’s Notre Dame Cathedral.

Police cordoned off and evacuated the area around the museum on Friday. Louvre officials closed the museum and kept visitors inside from leaving.