REUTERS: Swedish Prime Minister Stefan Lofven was ousted in late September when he lost a no-confidence vote in parliament after an inconclusive election, triggering a period of political deadlock that has lasted more than four months.
The country has had no government in place since then, and two candidates to lead new administrations have already been voted down by parliament.
On Friday it will vote on Lofven's candidacy after his Social Democrats struck a policy deal with the Centre and Liberal parties, and the Left Party said it would abstain, giving the former welder and union leader just enough backing to be elected.
Below are key points about the deadlock and its consequences.
WHAT SPARKED THE DEADLOCK?
The election results on Sept. 9 gave neither of the two political blocs in parliament the majority needed to form a government without the help of the anti-immigration Sweden Democrats.
WHAT ARE THOSE POLITICAL BLOCS?
There is a centre-right Alliance consisting of the Moderates, the Christian Democrats, the Centre Party and the Liberals. There is also a centre-left line-up consisting of the Social Democrats and the Greens, who have ruled in a coalition with the support of the Left Party. All mainstream parties have refused to work with the Sweden Democrats.
WHY IS THERE NO GOVERNMENT YET?
While the Moderates and Christian Democrats wanted to rule with tacit support from the Sweden Democrats, their Centre and Liberal parties Alliance partners refused to form a minority government reliant on the far-right party for getting legislation through parliament.
The Social Democrats, Greens and Left have 144 seats in the 349-member parliament, one more than the centre-right Alliance.
The Sweden Democrats have 62 seats, giving them the balance of power between the two blocs.
In a first vote after the ousting of Lofven, the Centre Party and the Liberals voted down their own bloc's candidate, citing its need for support from the Sweden Democrats.
WHY DO MAINSTREAM PARTIES RULE OUT COOPERATING WITH THE SWEDEN DEMOCRATS?
The Sweden Democrats - with roots in the white supremacist fringe - want a voice on immigration, welfare and crime policies as the price for supporting a new government and have been threatening to block any new government unless they are given a say in policy.
WHO ARE THE CANDIDATES FOR PRIME MINISTER?
Lofven's main competitor for the premiership is Moderates leader Ulf Kristersson.
Centre Party leader Annie Loof was also at one point given the job of trying to break the deadlock by the speaker of parliament.
WHAT KIND OF DEAL WAS MADE BETWEEN SOCIAL DEMOCRATS AND THE TWO ALLIANCE PARTIES?
On Jan. 11, Social Democrats leader Lofven with support of the Greens made a deal with two opposition parties, the centre-right Centre and Liberal parties.
The agreement states that it will exclude the Sweden Democrats and the Left Party from influencing policy-making.
WHY DON'T THE CENTRE PARTY AND THE LIBERALS WANT THE LEFT PARTY TO HAVE INFLUENCE?
The Left Party was for a long time Sweden's Communist Party and has deep leftist roots. The Centre Party and the Liberals have said that any deal they make with the Social Democrats needs to exclude the Left Party.
IS THE ALLIANCE STILL ALIVE?
The PM candidate for the Alliance, Ulf Kristersson, said after the deal between the Social Democrats, Centre and the Liberals on Jan. 11: "This is a real betrayal of all the voters who voted for an Alliance party in order to get a new government and a new direction in Swedish politics."
"If today's decision is carried out, they are breaking up the Alliance at a national level," he added.
WHAT ARE THE POSSIBLE OUTCOMES?
In Friday's vote Stefan Lofven will most likely get the support needed to form a coalition with the Greens.
If parliament fails to elect him as prime minister, only one more attempt to form a government will be made before a snap election is held.
WHY DID THE LEFT PARTY SUPPORT LOFVEN?
The Left party is not officially supporting Lofven but will abstain from voting against him on Friday. Although they first refused to support a government that would exclude it from political influence, they later said they would not stop the government, after talks with Lofven.
However, they warned that if Lofven's government swings too far to the right they will try to pull the plug on him, suggesting he may struggle to deliver on an agenda that includes tax cuts and labour market reform.
WHO WILL BENEFIT FROM A SNAP ELECTION?
Recent polls from local Swedish polling companies show there has been no big change in public opinion trends since the election, with the Sweden Democrats polling at their average before the election, making it likely a new parliamentary election would not help resolve the situation.
GRAPHIC - Election scenarios: https://tmsnrt.rs/2p45tJh
TIMELINE- Swedish political timeline:
(Reporting by Tommy Lund, Marta Frackowiak and Jagoda Darlak; Editing by Hugh Lawson)