Sweden’s ruling centre-left bloc holds just one more parliamentary seat than its centre-right rival, election authorities said, with all votes now counted after an election that has left the country in political deadlock and facing weeks, if not months, of talks to form a new government.

Full preliminary results, including overseas and postal votes, showed the Social Democrat, Green and Left parties took 40.7% of the vote, giving them 144 seats, while the centre-right Alliance of the Moderate, Centre, Christian Democrat and Liberal parties won 40.3% and 143 seats.

Both blocs are well short of a majority in the 349-seat Riksdag and whatever government finally emerges will need support either from members of the opposition bloc, or from the far-right Sweden Democrats whose 17.5% of the vote gave them 62 MPs, to pass new legislation.

The Sweden Democrats, populists shunned by all other parties because of their neo-Nazi roots, achieved their highest ever score but did not get near the 25%-plus share of the vote that their leadership and many opinion polls had forecast. Depending on the make-up of the new government, however, they could still wield considerable influence in parliament.

The official result would be confirmed this weekend, the election authority said on Friday, after all votes had been recounted and double-checked. That is a longer process than normal because of the high turnout of 84.4%, but standard electoral practice in Sweden and not expected to change the result.

Stefan Löfven, the Social Democrat prime minister, rejected a demand from Ulf Kristersson, the Moderate party leader, to step aside and help the centre-right alliance form a viable government, saying it would be “illogical” for the larger bloc to facilitate an Alliance government. “You can discount that idea absolutely,” Löfven said.

But Kristersson, the centre-right’s candidate for the premiership, said it was “natural” for the Alliance to now seek a mandate to build a government. “We want the government to respect the result and resign,” he told a news conference.

The Christian Democrat leader, Ebba Busch Thor, said “the Alliance is the government alternative that is clearly larger than the Social Democrats, and clearly larger than the current government” of the Social Democrats and Greens. Löfven, however, is counting the former communist Left party, which backed the outgoing coalition in parliament, as part of his centre-left bloc.

The prime minister had earlier said he believed the election result marked the end of Sweden’s traditional system of political blocs, which has been severely destabilised by the steady rise of the anti-immigration Sweden Democrats.

He wants to form some kind of coalition or cross-bloc deal with the smaller Centre and Liberal parties but both have so far indicated they would prefer to stick within their bloc, aware that splitting the Alliance could condemn the centre right to years in opposition or as minority members of Social Democrat-led governments.

A “grand coalition” of the Social Democrats and Moderates could also lend credence to the Sweden Democrats’ claim to be the only true opposition. The other parties are so far holding to their pledge not to negotiate with the far-right party, which has promised to use its parliamentary votes to sink any government that does not give it a say over policy, particularly on immigration.

“Our enemies have really forced us into a life-and-death struggle for our culture and our nation’s survival,” Mattias Karlsson, the Sweden Democrats’ parliamentary group leader and chief ideologue, wrote on his Facebook page. “There are only two choices: victory or death.”