Prime Minister Stefan Lofven's ruling center-left bloc maintained a slight lead with 40.6% of the vote, with the center-right alliance winning 40.3%.
Jimmie Åkesson's eurosceptic, anti-mass migration party is forecast to take 19.2 percent of the vote in an exit poll for public broadcaster STV, while the ruling Prime Minister Stefan Löfven's ruling Social Democrats losing significant ground and their Green Party partners only just breaking the 4 percent parliamentary threshold.
The results were largely in line with the conventional opinion polls tracked by Reuters in the run-up to the election but well below some online surveys that had predicted the Sweden Democrats could become the largest party. It received a little more than one in six votes, or 17.6 per cent.
Sweden went to the polls on Sunday in a general election that is expected to be one of the most unpredictable and thrilling races in the Scandinavian country for decades amid heated debate on immigration.
The influence of the far right is being increasingly noticed in Sweden as security and immigration top the agenda. "The democratic revolution in Europe is moving forward!"
Sabina Macri, voting in central Stockholm, said the current political situation has left her questioning her future in Sweden.
"This government we have had now. they have prioritised, during these four years, asylum-seekers", Akesson said, giving an exhaustive list of things he says the government has failed to do for Swedish society because of migrants. As freelance journalist Sidsel Overgaard reported for NPR's Weekend Edition Saturday: "Sweden does not track the ethnicity of perpetrators, so making a connection between immigration and crime is a largely speculative exercise".
His comments could be interpreted as a call for the centre-right Moderate Party to reach out and make a deal with the Sweden Democrats, which would allow them to gain greater control in the Riksdag.
"It's. about decency, about a decent democracy".
Leaders in Brussels will be disappointed with the party's surge ahead of the European Parliament's elections in May next year, as they bid to discourage euroskepticism following the UK's decision to leave the EU, and as populist parties form alliances to shake up the EU establishment ahead of the vote.
If the preliminary results are confirmed, the Social Democrats' result would be its worst showing in a century. "They're more direct", Elias, an 18-year-old voting in his first election, told AFP.
He says he is interested in cooperating with other parties and wants to tell the head of the party that came in second, the Moderates, "how to govern the country".
Party leader Jimmie Akesson said the party has "won" Sweden's national election if you looked at the number of seats gained.
Analysts predict long and complicated negotiations are now likely to build a majority, or - more likely - a minority that will not easily be sunk.
Separately, Swedish tabloid Expressen interviewed a representative of the right-wing Sweden Democrats.
"This party has increased and made the biggest gains". "But I'm not sure about the way of the Sweden Democrats".
But as Savage notes, that's not the case this year, in an unpredictable election where much of the vote has hinged on voter attitudes on the issue of immigration.