The prime minister is usually the leader of the party with the most votes, but Sweden's fragmented political landscape after Sunday's election makes it impossible to predict who will form the next government.
As expected, neither the center-left nor the center-right bloc obtained a majority.
Far-right parties have gained strength in elections in recent years in several European countries, including Germany and Italy.
"However the dramatic bloc battle plays out, it looks like it will be difficult for Sweden to have a functioning government," paper of reference Dagens Nyheter wrote in an editorial.
Social Democratic Prime Minister Stefan Lofven's "red-green" left bloc enjoys a razor-thin one-seat lead over the center-right opposition Alliance.
Fewer than 30,000 votes separate the blocs and nearly 200,000 ballots have yet to be counted, including votes cast in advance and abroad.
The Social Democrats won 28.4 percent of votes, down 2.8 points from the 2014 elections, their worst score in a century.
"Nevertheless, voters made the Social Democrats Sweden's biggest party," Lofven said.
He has extended an invitation to the opposition in a bid to break the deadlock.
"We need a cross-bloc cooperation," he told his party supporters.
Lofven was meeting Monday with his party executive to discuss the road ahead.
The four-party Alliance has however rejected his offer, urging him to step down and make way for them to build a government.
Lofven is seeking a new four-year mandate but he will have difficulty forming a stable government. He, like all of the other parties, has categorically ruled out any cooperation with the far-right.
He could try to build a similar government to the one he formed in 2014: a minority coalition with the Greens that relies on the informal support in parliament of the ex-communist Left Party.
But it would then be under constant threat from the Sweden Democrats, out to topple it at the first opportunity.
They are ready to block any attempt to pass legislation, such as the autumn budget bill.
Lofven could also invite the Centre and Liberal parties to join him at the negotiating table.
"If the red-green bloc is bigger, the Centre and the Liberals hold the key and not Jimmie Akesson," the Sweden Democrat leader, said University of Gothenburg political science professor Mikael Gilliam on Swedish public radio.
With one major caveat: the Centre and Liberals are members of the Alliance, together with the Moderates and Christian Democrats.
But that is no easy task.
The Alliance would need the far-right's support to obtain a majority.
It would have to either make policy concessions in exchange for the Sweden Democrats' support or offer key positions on parliamentary committees that draft legislation.
The Sweden Democrats won 17.6 percent of votes -- up almost five percent from the previous election.
The party's leader Akesson told Swedish public radio on Monday he expected to wield major influence.
"He who understands first that he can talk to me will have the easiest time building a government and leading this country for the next four years," he said.
But, he told news agency TT, "we have a long list of demands we're going to set in any negotiations." To avoid that situation, Kristersson appears to favor some form of broad cross-bloc cooperation with the Social Democrats.
In the past four-year mandate, the two have signed 26 deals to pass legislation, notably on immigration, energy and the climate.
Voter turnout, traditionally high in Sweden, was 84.4 percent, official figures showed.
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)