ARTICLE AD BOX
By Maddy Savage
BBC News, Stockholm
Magdalena Andersson's rise to power has been nothing short of a political soap opera, and the season finale may be yet to come.
Within a week, Sweden's parliament has voted her in as its first woman prime minister, watched her resign seven hours later amidst political turmoil and waved her back into the job after a second vote.
Why it all unfolded, and what could happen next, has highlighted the complexities of eight-party coalition politics in a divided nation.
Why did Sweden need a new prime minister?
Last Wednesday's first prime ministerial vote in parliament followed the retirement of Stefan Lofven, who'd been leading a Social Democrat-Green coalition government since 2014.
His party, the Social Democrats, selected Magdalena Andersson as his replacement as party leader at their conference in early November. But she needed the approval of parliament to step into the historic role of Sweden's first female prime minister, exactly 100 years since women first got the vote in the country.
What happened with the first vote?
Under Sweden's political system, Ms Andersson didn't need a majority of MPs to vote her in, she needed simply to avoid a majority voting against her becoming prime minister.
But this was always going to be a tough call due to a politically fragmented parliament. The governing coalition led by the Social Democrats is weak and dependent on support from other parliamentary parties.
She got through by a single vote, following eleventh-hour negotiations with the Left party and earlier talks with the centre-right Centre Party, who both agreed to abstain. It was a historic first for Sweden, the last Nordic country to elect a woman as prime minister.
But that didn't commit parliament to supporting her in a crucial budget vote that same afternoon. Instead, the Centre Party helped pass an alternative proposal from three right-wing parties including the anti-immigration Sweden Democrats.
Getty Images
We cannot support a budget from a government which is moving far to the left, which we think the incoming government is doing
So the Greens quit the coalition government saying they didn't want any part in a budget negotiated by nationalists.
And Ms Andersson asked to step down as prime minister, telling a news conference: "I don't want to lead a government whose legitimacy will be questioned."
'Who's running Sweden?'
The key question on the lips of many Swedes came from a foreign correspondent working for Finnish public broadcaster YLE.
"Excuse me... who is leading Sweden right now?" asked Lucas Dahlstrom, prompting laughter from fellow journalists and a clip that went viral.
Magdalena Andersson explained that she'd not technically started the job, so the answer was a caretaker government led by Stefan Lofven.
Is this kind of chaos unusual?
So much so that it was subbed "Super Wednesday" by commentators.
Ms Andersson's resignation wrapped up the most dramatic day in Sweden's political history.
Sweden has a long history of parliamentary stability and co-operative coalition politics, with the Social Democrats dominating for most of the last century.
"A minority government is very common in all Scandinavian countries," explains Drude Dahlerup, professor of political science at Stockholm University. "But the atmosphere in the Swedish parliament right now... is very hostile and no party is really willing to give in."
Getty Images
First Nordic female PMs
NorwayGro Harlem Brundtland: three terms between 1981 and 1996
FinlandAnneli Jaatteenmaki: 2003
IcelandJohanna Sigurdardottir: 2009-13
DenmarkHelle Thorning-Schmidt: 2011-15
SwedenMagdalena Andersson: 2021 -
Source: Nordic governments
The drama put the brakes on any celebrations of the fact that Sweden had finally caught up with its Nordic neighbours in electing its first female leader.
"It was supposed to be a very good day for Sweden," adds Prof Dahlerup. "But it was chaotic and unforeseeable. It was like our parties played with closed cards."
How did she get the job back?
By Monday, parliament's speaker had given politicians another chance to approve or reject Magdalena Andersson as head of a one-party government.
Since none of them had changed their positions, and none of the opposition parties had enough support to propose an alternative government, she was voted back in on Monday.
So now her Social Democrat party will govern alone for the first time in 15 years.
Ms Andersson has promised to boost welfare spending and limit the privatisation of schools, healthcare and elderly homes, cut greenhouse gas emissions and tackle crime and segregation in Sweden.
What do we know about her?
Magdalena Andersson, 54, is an experienced career politician and has a reputation as a straight talker and a strong negotiator.
She had been finance minister in Stefan Lofven's government since 2014.
Prior to becoming an MP, she was a junior swimming champion, worked as a political adviser and held a senior role at the Swedish Tax Agency.
She studied at Harvard University and Stockholm School of Economics, where she met her husband, who now works as a professor there. They have two children and enjoy hiking and barbecuing together.
What happens next?
She will still be bound to follow the budget negotiated by three opposition right-wing parties, including the nationalist Sweden Democrats.
As head of a one-party minority government, which has just 100 MPs out of 349 in parliament, she will also find it challenging to push through any future policies.
She has just over nine months to prove herself to the public, with Sweden scheduled to hold its next election in September 2022.
Polls suggest voters have more confidence in her than in any of Sweden's other party leaders. But her increased profile in the media has so far failed to drum up extra support for her party.
Another key variable is what happens to the nationalists.
Until now, other right-wing opposition parties have refused to form a coalition with the Sweden Democrats, even though it would break the current political deadlock.
But two of them, the conservative Moderates and the Christian Democrats, appear to be increasingly open to negotiating with them.
"I wouldn't guess who's going to win the next election," says Prof Dahlerup.