Donald Trump has been under fire on Twitter for his criticism of London Mayor Sadiq Khan's comments following the London Bridge attacks, with many in the UK telling the US president he would not be welcome in the British capital.

The anger was sparked when Trump tweeted his response to Khan's plea that Londoners should not be alarmed by an increased police presence in the city following the terror attack on Saturday that killed seven people.

The US president wrote: "Pathetic excuse by London Mayor Sadiq Khan who had to think fast on his 'no reason to be alarmed' statement. MSM is working hard to sell it!"

But Twitter users quickly took Trump to task, urging him to instead focus on the shooting in Orlando or at the very least to not take Khan's words out of context.

"Sweet Jesus, what the hell are you doing, you deranged old fool? Are you trying to sabotage US and UK relations?!" tweeted Mike P Williams. "Worry about today's Orlando shooting and stop being hysterically xenophobic because our Mayor is Muslim. Beyond embarrassing."

Others called for Trump to be banned from visiting London, a not-so-veiled reference to his travel ban.

Meanwhile, the United States Conference of Mayors said that it backed Khan.

In a statement, they said: "He has risen above this crisis of death and destruction, as mayors continue to do, to alleviate fear, to bring comfort to his people of London and to give support to the first responders who continue to protect, defend and provide emergency care to his people of London."

New York City Mayor Bill de Blasio called Khan a "very positive example" who should be "supported, not attacked".

"Mayor Sadiq Khan is a very positive example to the Western world of someone who came from the Muslim community and has become a leader of all communities and he's a very positive example to peace-loving Muslims and Muslims who believe in democracy all over the world," he said.

"He should be supported, not attacked,"