Using a familiar conservative argument to defend gun ownership, Trump asked sarcastically whether vans, trucks and cars, which have been used by terrorists, should be banned. Then he turned to knives.

“I recently read a story that in London, which has unbelievably tough gun laws, a once very prestigious hospital, right in the middle, is like a war zone for horrible stabbing wounds,” he said. “Yes, that’s right, they don’t have guns, they have knives and instead there’s blood all over the floors of this hospital. They say it’s as bad as a military war zone hospital.”

Trump stabbed the air several times with an imaginary knife and muttered: “Knives, knives, knives.”

He added: “London hasn’t been used to that. They’re getting used to it. Pretty tough. We’re here today because we recognise a simple fact: the one thing that has always stood between the American people and the elimination of our second amendment rights has been conservatives in Congress willing to fight for those rights. We’re fighting.”

It was not immediately clear which “story” Trump had read about London, but a strong contender is a Mail Online article published last month. Its headline said: “Surgeon says he is regularly treating children in school uniform for gun and knife wounds in London hospital which is ‘like Afghan war zone’.”

The article quoted a BBC Radio 4 interview with Martin Griffiths, a lead trauma surgeon at the Royal London Hospital in Whitechapel, where it said a record 702 stabbing victims were treated in 2017. “Griffiths said colleagues who served in the military likened their work at the London hospital to being back at Camp Bastion, the British forces base in war-torn Afghanistan,” Mail Online reported.

Trump’s mother was British but there have been bumps in the transatlantic relationship since he took office. Theresa May, the first foreign leader to come to his White House, invited Trump on a state visit but that honour seems to be on indefinite hold.

Last June, Trump criticised Sadiq Khan, the mayor of London, hours after a deadly terrorist attack, based on a selective and misleading quotation. Khan’s office said the mayor had “more important things to do than respond to Donald Trump’s ill-informed tweet that deliberately takes out of context his remarks”.

In November, May rebuked Trump for retweeting anti-Islamic posts by the far-right fringe group Britain First. The president, whose relations with France’s Emmanuel Macron appear far warmer, will finally make a “working visit” to the UK on Friday 13 July, immediately after a Nato summit in Brussels.

Mass protests are expected. Khan tweeted last month: “If he comes to London, President Trump will experience an open and diverse city that has always chosen unity over division and hope over fear. He will also no doubt see that Londoners hold their liberal values of freedom of speech very dear.”