President Donald Trump has been ridiculed after he appeared to be using today's incident at the Louvre in Paris as a justification for his travel ban - despite the fact that it would not have prevented the attack by a machete-wielding man.

A few hours after the attack 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.'

It has emerged the assailant was Egyptian and may have arrived from Dubai last month.

Neither Egypt or the United Arab Emirates are on the list of seven countries whose citizens President Trump has banned from entering the US.

American keyboard player Benmont Tench tweeted: 'Thank god the terrorist attacker at the Louvre was stopped. An Egyptian national, entered France from Dubai. Neither country banned by Trump.'

Scroll down for video

President Trump appeared to be seeking to make political capital out of the Louvre attack

This picture showed the aftermath of the attack, with four French soldiers with their weapons out standing around the injured assailant and a small machete lying on the floor

R A Baker added: 'I don't usually comment on "unfolding events" where the full facts aren't available, but if the Louvre attacker is Egyptian...oops Trump!'

Jason, from Wales, tweeted: 'Hey with the louvre attacker being Egyptian, when is the ban on Egyptians coming in? It's America first not Trump first right?'

John Yazek added: 'The attacker was Egyptian. Does that mean Trump needs to add Egypt to the ban? Probably not - Trump makes $ there.'

French psychologist tweeted: 'Trump quickly condemns Louvre attack, still quiet on Quebec and he's Egyptian, so can be cleared into Trumpistan!'

Several Twitter users ridiculed Trump for suggesting the Louvre attack justified his travel ban

Chinese tourists mill around outside the Louvre after it was locked down after the attack

Star Trek actor George Takei tweeted: 'Trump was quick to condemn the Louvre attack. But he stayed pretty quiet over the mosque shooting in Montreal. That speaks volumes.'

Another Twitter user, Chris Martin, tweeted: 'Trump logic: Louvre attack- "told you we should ban Muslims." Quebec shooting - "We need more guns for the mentally ill".'

Today's Louvre attacker was shot and critically wounded by four soldiers and is under armed guard in a Paris hospital.

French Prime Minister Bernard Cazeneuve has described the attack as 'terrorist in nature'

The chief of police in Paris said the suspect was shouting 'Allahu Akbar' - Arabic for 'God is the greatest' - but, apart from the machete, he was reportedly armed with nothing more than paint bombs.

The man has not been identified officially but is known to be Egyptian.

An unconfirmed report by French TV network LCI named the suspect as 29-year-old Abdallah EH, who arrived in France on a flight from Dubai on January 26.

He was not known to security services, said the network.

After being refused entry to the Louvre, he pulled out the weapon and was shot by a soldier, officials have confirmed. A paratrooper is believed to have suffered a minor head injury.

French Prime Minister Bernard Cazeneuve has described the attack as 'terrorist in nature'.