As they did in cities across Western Europe, migrants tended to cluster in low-income neighborhoods; facing poor job prospects and rampant employment discrimination, they naturally turned inward. More young women have started wearing the hijab recently, Mr. Abdirahman tells me, and more young men “internalize the otherness” — rejected by their new society, they embrace the stereotypes imposed upon them. This can lead to a point where they reject gay rights or liberalism as “white, Western ideas,” and even attack firefighters because they represent the state.

As we walk around, Mr. Abdirahman, who is single and childless, confesses: “When I came here in 1998, to me this place was paradise. Today, I wouldn’t want my children to grow up here.”

Mr. Abdirahman says he was lucky: His mother encouraged him to contribute to society and get a good education. He earned a degree in international studies in New York, then worked in Geneva and with the United States Embassy here before going to work with the chamber of commerce. Not all immigrants get the same push at home, he says; some parents discouraged their youngsters from going to the city center to mix. Sweden, he is afraid, has entered a vicious circle of immigration, segregation and growing mutual hostility.

The situation grew worse with the latest mass influx of refugees, in 2015, after which a number of suburbs became almost exclusively migrant. Considered “no go” areas by some Swedes, these neighborhoods are known to outsiders only from horrific headlines. What people don’t get to see, Mr. Abdirahman worries, is the bus driver or the cleaning lady working themselves ragged to get their children into a university.

None of this is new, and yet the government, dominated by the traditionally strong Social Democrats and the centrist Moderate Party, did far too little. That left an opening for the Sweden Democrats, until recently a group relegated to the racist fringe of Swedish politics. In the past few years, the party has recast itself; just like the populist Alternative für Deutschland party in Germany and the Five Star Movement in Italy, it has repositioned itself as anti-establishment and anti-immigrant. The Sweden Democrats accuses all other political actors and the media of “destroying” Sweden, calls for a suspension of the right to asylum and promotes an exit of Sweden from the European Union.