Sweden became the latest European country to shift to the right on Sunday as immigration continues to reshape the continent’s political landscape.

A right-wing party with roots in neo-Nazism garnered an estimated 17.6% of ballots cast in Sunday’s election, according to a count of the vast majority of constituencies. It was the best-ever showing for the Sweden Democrats, and it leaves the composition of Sweden’s next government uncertain.

The...