I found this Newsnight documentary pretty enlightening on the background to the vote in Sweden; https://www.youtube.com/watch?v=SCKxyDTlfHs
Stick with it, it's not the predictable narrative that it seems to be in the first few minutes.
That's a good one. In particular from about 11 minutes in and to the end. You have the construction worker experiencing the competition from abroad, you have the second generation immigrant, you have the policeman who thinks he would be called a racist, maybe even a nazi, if he said the same things in a different place. Hardly the typical lunatics of the far right, but people who help explain the situation.
It's complex and it's a big mistake to say Sd voters are racists or far right. They have collected voters who disagree with the way things are going, people who see the bad sides of society, or the negative effects of globalism. They have become the party for people who are against immigration, the EU, those disappointed with crime (the shootings in Malmö, but also the lack of actual policemen, in particular in the countryside) etc.
The problem has built up over the past ~25 years and the best examples were the two referendums. The first one was a 52-47 win to join the EU. Most political parties were for, but almost half the voters against, so a clear mismatch between voters and politicians. Then the euro, which was a clear win 56-42 against, where the big parties were for joining. And they lost. Again a clear mismatch. People indicated that they disagreed with the way the big parties had chosen.
At this point people started to vote for someone else. It was the Pirate party and some smaller ones, but Sd became the big player. Reaction? You have every political party unite and say they don't want to talk to Sd, because you are a racist if you belong to Sd. I disagree with Sd, but I have a big problem with the mentality of the other parties. They are trying to head off in a direction people disagree with and if you are against, you are a racist or a nazi and your opinion shouldn't even be considered. 27 years ago, when a politician famously ignored a new party's success and left the tv studio as they entered, the reaction was that he, who left, was an idiot who didn't respect the voters. Do that to Sd today and that is almost like a badge of honor among the political elite. Unfortunately, that will cause more anger and result in an even stronger Sd and/or more extreme views. The shift was smaller than anticipated, but the communists and Sd grew in the election and the two largest parties lost voters. But we are likely to have a weak government and if we get the expected downturn in economy, this could soon become a lot worse. Politicians being out of touch with voters is never a good thing and they have really shot themselves in the foot here. And now they are reloading.