HELSINKI — When a riot broke out in a predominantly immigrant Stockholm suburb this week, the biggest surprise for many Swedes was that a police officer found it necessary to fire his gun.

For President Trump and his supporters, however, the episode appeared to confirm Trump’s vague observation two days earlier that the Scandinavian country was at risk of becoming a breeding ground for extremist attacks.

It’s true that Sweden, which prides itself on welcoming newcomers, is seeing a new kind of urban unrest. The combination of the country’s open-door policy and comparatively heterogeneous culture has led to friction, especially in areas where many longtime immigrants feel disempowered.

Yet its problems with crime, poverty and violence are no greater – and potentially much less – than in the United States and other countries with home-grown gangs as well as waves of new arrivals – and Trump’s focus on Swedish issues has left many people there puzzled.

This week’s trouble started when police arrested a drug crime suspect in Rinkeby late Monday. Rioters threw rocks at police, set cars on fire and looted shops, but no one was injured. Similar episodes of unrest have happened sporadically in Sweden, especially in immigrant neighborhoods.

The flash seemed to corroborate Trump’s suggestion two days earlier that Sweden could be the next European country to suffer the kind of extremist attacks that have devastated France, Belgium and Germany.

“My statement as to what’s happening in Sweden was in reference to a story that was broadcast on @FoxNews concerning immigrants & Sweden,” Trump tweeted after he suggested at a Saturday rally that a major incident had befallen the country the night before.

The president’s initial remarks bewildered Swedes – and gave rise to ridicule and a barrage of comment on social media – because no such incident had taken place on Friday night.

The president might have been referring to a segment aired Friday night on the Fox News show “Tucker Carlson Tonight.” It reported that Sweden had accepted more than 160,000 asylum-seekers last year, but that only 500 of the migrants had found jobs.

Illustrated with images of broken windows and fires, the segment went on to say that a surge in gun violence and rape had followed an influx of immigrants to the country of 10 million.

Sweden received a record 163,000 asylum-seekers in 2015, not in 2016 as reported in the Fox News story. That was the highest per-capita rate in Europe, and the country’s has since reduced the number of refugees and migrants it will accept, acknowledging it cannot manage such a large inflow.

Although the right-wing Sweden Democrats have tapped into a growing anti-immigrant sentiment, many Swedes are disinclined to link any increases in crime to the recent rapid growth in the number of refugees and migrants that streamed into the country and others in Europe.

The riot and gang battles over territory are mostly in areas where low-income immigrants settled decades ago.