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 the government said appeared to have been a terrorist attack.

The man shouted slogan and rushed at police and soldiers 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.

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

Prime Minister Bernard Cazeneuve said during a visit to Bayeux in Normandy: “It appears to be an attempted attack of a terrorist nature.”

The soldier who fired the bullets was from one of the patrolling groups that have become a common sight around the capital since a state of emergency was declared across France in November 2015. An anti-terrorism inquiry has been opened, the public prosecutor said in a statement.

Another soldier was slightly wounded in the incident.

The identity and nationality of the attacker remains unknown for now, French Interior Ministry spokesman Pierre-Henry Brandet told reporters. Interior Minister Bruno le Roux abandoned a trip to the Dordogne region to return to Paris.

More than 230 people have died in France in the past two years at the hands of attackers allied to the militant 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.

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 city had in recent months been gradually recovering from a dip in foreign tourism caused by the attacks.

The most recent deadly attack took place in the southern city of Nice in July last year 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 for a time on Friday but began to allow traffic to pass less than two hours after the incident. Louvre officials closed the museum and kept visitors inside for a time before beginning to let them leave. —Reuters