US President Donald Trump has been ridiculed after suggesting Sweden had been the victim of a major terror incident during his speech at a Florida rally.

The president was speaking to the crowd in Melbourne about terror attacks in Europe when he said: "You look at what's happening last night in Sweden ... Sweden... who would believe this?"

He added: "Sweden, they took in large numbers, they are having problems like they never thought possible. You look at what's happening in Brussels, you look at what's happening all over the world."

Given there was no terror attack in Sweden, Swedish foreign ministry spokeswoman Catarina Axelsson told the Associated Press the government had no knowledge of any "terror-linked major incidents", adding they were seeking clarity from the US over the comment

Sweden's foreign minister Margot Wallström did not directly address Trump's comments but instead posted a link to a speech about democracy.

And former foreign minister Carl Bildt was less subtle in his message about Trump, tweeting: "Sweden? Terror attack? What has he been smoking? Questions abound."

However, Trump has since claimed he was not talking about a terror attack but instead referencing a news story about immigration.

Meanwhile, Swedes took to social media to mock the US president, with many sharing tales the hashtag #lastnightinSweden

One Twitter user wrote: "‪#lastnightinsweden: Free healthcare & education. Paid vacation & maternity leave. Democracy. Just the usual Scandinavian stuff."

Another said: "‪#lastnightinsweden I ate shrimp, drank some wine and counted my lucky stars I don't live in the US."

Many people from Sweden also used social media to confirm there had been no terror attack there last night, with crime rates in the country remaining stable over the past 10 years.

Several people also drew comparisons between Trump's comment and the claim made by his adviser Kellyanne Conway about the fictional 'Bowling Green massacre'.