Swedes voted on Sunday in an election dominated by fears over asylum seekers and welfare, with the anti-immigration Sweden Democrats vying to become the biggest party in a country long seen as a bastion of liberal values.
Far-right parties have made spectacular gains throughout Europe in recent years after a refugee crisis sparked by civil war in Syria and conflicts in Afghanistan and parts of Africa.
In Sweden, the influx of 163,000 asylum seekers in 2015 has polarized voters, fracturing the political consensus and could give the Sweden Democrats, a party with roots in the white supremacist fringe, a veto over who forms the next government.
"Traditional parties have failed to respond to the sense of discontent that exists," said Magnus Blomgren, a social scientist at Umea University.
"That discontent maybe isn't directly related to unemployment or the economy, but simply a loss of faith in the political system. Sweden isn't alone in this."
The center-left bloc, uniting the minority governing Social Democrat and Green parties with the Left Party, is backed by about 40 percent of voters, recent opinion polls indicate, with a slim lead over the center-right Alliance bloc.
The Sweden Democrats, who want the country to leave the European Union and put a freeze on immigration, have about 17 percent, up from the 13 percent they scored in the 2014 vote, opinion polls suggest.
"Everything points to us having a good election," Sweden Democrats leader Jimmie Akesson told Reuters on the sidelines of a party rally in the southern town of Malmo on Saturday that drew supporters as well as chanting protesters.
"What we, the Sweden Democrats, are saying, and which is considered incredibly controversial in Sweden, is normal politics in the rest of Europe."
The party's support was widely underestimated before the previous election and some online surveys give them as much as 25 percent, a result that would be likely to make them the biggest party, dethroning the Social Democrats for the first time in a century.
"It would send a big 'go to hell' message to me and my kind," said Stefan Jovanovic, 26, a music business manager with roots in Serbia.
"Because we all know that their whole political message is about one thing and one thing only, and that is the question of immigration."
Such an outcome could weaken the Swedish crown in the short term, but analysts do not see any long-term effect on markets from the election because economic growth is strong, government coffers are well stocked and there is broad agreement about the thrust of economic policy.
Sweden has flirted with populism before. New Democracy, founded by an aristocrat and a record producer, won nearly 7 percent of the vote in 1991, on the promise of strict immigration policies, cheaper alcohol and free parking, only to crash out of parliament three years later.
The Sweden Democrats are bidding to become the biggest populist party in the Nordic region, topping the Danish People's Party, which gained 21 percent in 2015, and trump the 12.6 percent for the far-right Alternative for Germany, which swept into the Bundestag last year.
With an eye on the European Parliament elections next year, Brussels policymakers are watching the Swedish vote closely, concerned that a nation with impeccable democratic credentials could add to the growing chorus of Euroscepticism in the EU.
Sweden took in more asylum seekers per capita than any other country in Europe in 2015, magnifying worries about a welfare system that many voters already believe is in crisis.
Lengthening queues for critical operations, shortages of doctors and teachers and a police service that has failed to deal with inner-city gang violence have shaken faith in the "Swedish model", built on a promise of comprehensive welfare and social inclusion.
The Sweden Democrat's Akesson has labeled the vote a choice between immigration and welfare in election campaign that has been unusually antagonistic.
"It has been really unpleasant," student Katze Collmar, 32, said while voting in central Stockholm.
"It feels like Sweden could take a step in this election that we won't be able to recover from very easily."
Mainstream politicians have so far refused to cooperate with the Sweden Democrats.
But with some kind of cooperation between parties in the center-left and center-right blocs the only other alternative to the current political deadlock, analysts believe that Akesson may yet end up with some influence on policy.
Akesson has promised to sink any government that refuses to give his party a say in policy, particularly on immigration.
With deadlock looming, it could take weeks to form a government.
Voting stations close at 1800 GMT, with exit polls set be published by Sweden's two main broadcasters. Results from the vote will become clear later in the evening.
Simon Johnson and Johan Sennero of Reuters reported from Stockholm.