Sweden’s first ever woman prime minister, Magdalena Andersson resigned only a few hours after she was appointed to gather more support after one of her coalition partners, the Greens, quit the new government.

Andersson announced her resignation at a press conference telling reporters: “There is a constitutional practice that a coalition government should resign when one party quits. I don’t want to lead a government whose legitimacy will be questioned.”

From the start, Andersson’s position was precarious. Rather than winning the majority of votes, the current finance minister was victorious due to the fact that the majority of MPs did not vote against her which, according to Sweden’s electoral system, is sufficient enough support to become prime minister.

Of the 349 members of the Riksdag, 174 voted against Ms Andersson, 117 voted for her and a further 57 abstained, meaning she won (or rather didn’t lose) by a single vote. She nevertheless enjoyed a standing ovation when the outcome of the vote was announced earlier today.

Furthermore, Opposition parties on the centre and right have voiced concern at the government’s shift to the left. While the Centrist Party backed her leadership campaign, its leader Annie Loof has said that it would not support Andersson’s proposed budget meaning that an opposition budget has now won the parliament’s support.

Since joining the Social Democratic Youth League during her first year of high school, Ms Andersson has been involved in politics throughout her career. During the mid 90s, she worked as a political advisor in a number of departments including the Prime Minister’s office. She then worked as a civil servant at the Ministry of Finance before returning to an advisory role in 2006. In 2014 she was elected as a member of the Riksdag when she was appointed as Minister of Finance. She has earned a reputation as a fierce debater and has been accused of “taking swings” against her opponents. The 54-year-old Andersson will need plenty of ‘swings’ now as she prepares to become the leader of a single-party government.