Magdalena Andersson was on Thursday unanimously elected as the new leader of Sweden's Social Democrats (SAP) party, paving the way for her to become the country's first female prime minister. Andersson, the country's finance minister, was the only candidate for the party chairman job. Her election in the position comes five months after SAP Prime Minister Stefan Lofven resigned after losing a vote of confidence in parliament. He then later announced he would step down as SAP party chairman in November. The 54-year-old economist and former competitive swimmer is set to become the first female Prime Minister in Swedish history, provided she wins a vote in Parliament, the date of which has not yet been set. "I agreed to become party chairman because I know that Sweden can do better," Andersson said in a statement. "And because I know that it is us Social Democrats who have the solutions to the problems Sweden is facing," she added. SAP is the largest formation in Sweden with 100 of parliament's 349 seats but the country's second largest party, the liberal-conservative Moderates are hoping to govern after moving closer to the right-wing populist Sweden Democrats. This would be a major political shift in Sweden after a decade of far-right breakthroughs fuelled by hostility to large refugee influxes. Löfven, who is still Prime Minister in a caretaker capacity, has not yet announced the exact date of his resignation, which should trigger the parliamentary process of electing Andersson. To succeed him, Andersson will need to secure the support of the Greens — with whom tSAP has been in multiple coalitions — as well as from the Left Party and the Centre Party, which had confidence and supply alliances with the Lofven government. Andersson will have to reassure these often divergent interests if she is not to be blocked in her march to power. Although a declared champion of gender equality, Sweden is the last Nordic country to have never had a female Prime Minister. If she secures the country's top job, she will then need to steer her party through the next general election, scheduled for September 2022, as support for the Social Democrats has been slipping. According to a Novus poll released on Thursday, SAP is polling at 25.6% — nearly three percentage points lower than at the last election — while the Moderates have seen their support grow by over three percentage points to 23%. The Sweden Democrats currently poll third with 19% of voting intentions, followed by the Left and Centre. — Agencies