A soldier on Friday shot and wounded a man armed with a machete who was trying to enter the Louvre museum in central Paris, police said.
Prime Minister Bernard Cazeneuve said the incident was "terrorist in nature".
Police said that the man had been trying to get into the museum's underground shop with a suitcase. His bag contained no explosives.
"We are dealing with an attack from an individual who was clearly aggressive and represented a direct threat, and whose comments lead us to believe that he wished to carry out a terrorist incident," Michel Cadot, the head of the French capital's police force, said, adding the man had shouted, "God is great".
The attacker was shot five times and seriously wounded. The soldier suffered slight head injuries.
The interior ministry said on Twitter that the incident was "serious". An anti-terrorism inquiry has been opened, the public prosecutor said in a statement.
Al Jazeera's Natacha Butler, reporting from Paris, said the motivation and the identity of the attacker is unknown.
"The entire area has been cordoned off with high-level security at the site," she said. "France has been in a state of emergency after a string of attacks for the past few years. And there [are] soldiers in several public places in Paris."
A spokeswoman for the Louvre said the museum was "closed for the moment" but would not confirm reports it had been evacuated.
The huge former royal palace in the heart of the city is home to the Mona Lisa and other world-famous works of art but is also a shopping complex and houses numerous exhibition spaces.
France has suffered a string of attacks.
In January 2015, gunmen killed cartoonists and journalists at the offices of the Charlie Hebdo, a satirical newspaper in Paris, while another attacker went on to kill shoppers in a Jewish supermarket, bringing the total number of people killed to 17 in three days of bloodshed.
Ten months later, gunmen and suicide bombers from the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group attacked bars, restaurants, a concert hall and the national stadium in Paris on November 13, 2015, killing 130 people.
Last July, a Tunisian man rammed a truck through crowds celebrating Bastille Day in Nice on France's south coast, crushing 86 people to death.
After Friday's incident at the Louvre, US President Donald Trump tweeted: "A new radical Islamic terrorist has just attacked in Louvre Museum in Paris. Tourists were locked down. France on edge again. GET SMART U.S."
Source: Al Jazeera and news agencies