In February the US President made a seemingly confused reference to a non-existent terror attack when he told a rally of supporters: “We’ve got to keep our country safe … Look at what’s happening in Germany, look at what happened last night in Sweden. They took in large numbers [of immigrants], they’re having problems like they never thought possible.”

Mr Trump later ‘clarified’ that he had in fact been referring to a Fox News item which included a clip from a film by a documentary maker who had said he wanted to “investigate why Sweden has become the rape capital of Europe” after admitting “over 350,000 Syrian refugees.”

Which only led to the rapid debunking of the claim that Sweden was the rape capital of Europe.

But within hours of the Stockholm attack claiming the lives of at least three people, Trump supporters were using social media to declare that the US president had been right all along.

Apparently ignoring Mr Trump’s backtracking that he had been referring to the rape, not terror threat in Sweden, his supporters claimed that he had prophetically “warned everyone”.

How are people "shocked" and "saddened" by this truck attack in #Stockholm? This is nothing new and Trump warned everyone. #Sweden

This prompted right-wing commentators to argue that Mr Trump had been right to criticise a Swedish immigration policy that saw the country admit 163,000 asylum seekers in 2015, more refugees per capita than anywhere else in Europe.

At that stage, though, the right-wing commentators were at pains to stress that it was “incorrect” to say Mr Trump had been referring to terrorism. They instead emphasised that he had been talking about a “break down in law and order” in Sweden.

They said that Rinkeby, where more than 90% of residents were born abroad or have foreign-born parents, was known locally as “Little Mogadishu”.

One police officer was quoted as saying he watched the riot and suggested to a colleague: “Perhaps Trump was right after all.” He later insisted, however, that he supported Sweden’s open immigration policy.

Right-wing commentators also argued that Sweden’s relatively low overall crime rates masked areas of high crime, ethnic isolation and joblessness. They quoted figures showing that while only five per cent of 15-74-year-old Swedish-born workers are jobless, foreign-born workers are three times more likely to be unemployed, and 22.5 per cent of immigrants from outside the EU are out of work.

Others, however, sought to put Sweden’s problems into perspective – among them those in Rinkeby itself.

Jamal Raheem, visiting Rinkeby on a two-week holiday from his home in east London told The Guardian: “Rinkeby is not dangerous. It’s a lot more dangerous in Stratford.”

Official figures suggested he might be right.

With 2,405 violent crimes reported per 100,000 residents in 2016, the Rinkeby-Kista district was the most dangerous place in Stockholm outside the city centre.

But even that figure – comparatively high by Swedish standards – was below the reported violent crime rate of 2,900 per 100,000 for the UK as a whole.

The US records violent crime in significantly different ways to the Sweden and the UK, but its murder rate has historically been far higher than in the other two countries.