Polling had suggested that the Sweden Democrats party, which is anti-immigration and pro-law and order (it sees the relatively peaceful country as descending into crime-ridden chaos) could win as much as a quarter of the vote.
During a heated debate Friday evening, party leader Jimmie Akesson caused a stir by saying migrants have trouble finding jobs because "they can't adjust to Sweden".
The governing centre-left bloc had a razor-thin edge over the centre-right opposition Alliance, with roughly 40 per cent each. The Sweden Democrats' strong showing was echoed on the far-left by a pop for the ex-communist Left Party, which captured 7.9 percent of the vote, up 2.2 percentage points from the previous election in 2014.
The scenario of a bipartisan coalition is highly uncertain. "I am ready to talk with others".
He had hoped to gain the support of one in five, or even one in four, Swedes, which some polls had also predicted.
"This government has run its course..."
The final election results were due late Sunday, but the composition of the next government may not be known for weeks. "But if they go out from the people's vote, you should have Social Democrats, Centre, Liberals and Green party all working together".
He is backed as candidate for the premiership by the Centre party (8.6 percent), the Liberals (5.5 percent) and the Christian Democrats (6.4 percent).
The poll projects that the ruling party received 26.2 percent of the vote.
This photo shows an election poster or Jimmie Akesson, right, leader of the far-right Sweden Democrats, and Social Democratic Prime Minister Stefan Lofven, second from right.in Flen, Sweden, Aug. 30, 2018. And as the complicated, likely drawn-out process of building a government begins, they're the bloc standing in each coalition's way of reaching a majority.
Results were based on 99% of the vote confirmed and will not be finalized until Wednesday when overseas votes are counted. The northern Republican Party was often strongly anti-immigrant-before World War One.
"We have two weeks left until parliament opens". "I think that there won't be a shift in power", she said.
Pollsters had warned that the far-right Sweden Democrats could end up winning veto power over which parties form the next government.
Hence the leader of the nationalist Sweden Democrats, Jimmy Akesson's claim, that he is the "kingmaker" being the third most popular party - but that's a simplified view.
But a grand coalition would have to involve at least three parties, making for a painful coalition negotiation.
"This election is a referendum about our welfare", Prime Minister Stefan Lofven said.
If he is forced to stand down, parliament would be dissolved and fresh coalition attempts would start in September.
But the surge crystallized long-running worries about Sweden's ability to integrate immigrant groups, turning what had been a taboo issue into one that dominated airwaves and the political conversation. He has categorically ruled out any cooperation with the far-right.
It has been working to rebrand itself, changing its logo from a flaming torch (similar to the one used by the United Kingdom far-right National Front) to a blue-and-yellow daisy, the colours of the Swedish flag.
Mr Akesson says there is zero tolerance towards racism in the party and several members have been expelled.
The center-right Moderates have become especially tough on immigration, echoing numerous positions of the Sweden Democrats.
The influx of 163,000 asylum-seekers in Sweden in 2015 has polarized voters and fractured a cozy political consensus.
Sweden's traditional parties have since hardened their tone to reflect concerns about integration. The party blames hordes of migrants for breaking the country's beloved welfare state, bringing in crime and threatening Swedish identity.
And in a Trumpian campaign tactic specifically created to enrage Sweden's Europhilic establishment, the Sweden Democrats have called for a referendum on European Union membership: Swexit . Support for the Green party, which had been struggling after various internal scandals, has crept up across the country.
During the heatwave, around 25,000 hectares of forest burned in wildfires.