US President Donald Trump has tweeted the US needs to "get smart" to the threat of Islamic terrorism in the wake of an attack on the Louvre in which an assailant, wielding a machete, attacked a French soldier.

French authorities said the threat had been contained, with one soldier superficially wounded. However, the US president has taken to social media to reassert that terror threats abroad show the United States needs to bolster its own security arrangements.

"A new radical terrorist has just attacked in Louvre Museum in Paris. Tourists were locked down. France on edge again. GET SMART US," Trump tweeted.

According to AFP, the French Prime Minister Bernard Cazeneuve has said the incident was "obviously" a terrorist attack. Although no Jihadi group has claimed responsibility for the attack, reports in the French media have stated the suspect, who was shot in the abdomen, shouted "Allahu akbar" or "God is great" in Arabic in the Louvre's Carousel area.

Trump has frequently commented on terror attacks in France in relation to the US. In November 2015 as a Republican candidate in the wake of Isis attacks in the French capital that left 130 dead he said at a campaign rally the situation could have been different if France had less gun restrictions.

"When you look at Paris – you know the toughest gun laws in the world, Paris – nobody had guns but the bad guys. Nobody had guns. Nobody," he said.

"You can say what you want, but if they had guns, if our people had guns, if they were allowed to carry – it would've been a much, much different situation," he added.

France has been under a state of emergency since the November 2015 and the Paris Attacks that killed 130 people. The Islamic State (Isis) claimed responsibility for the attack.

Under the state of emergency police have been given extended powers of search and arrest. Security forces have been deployed at high-profile 'soft targets' such as the Louvre, where French authorities fear an attack on civilians.