The speaker of Sweden’s parliament asked opposition leader and ex-premier Magdalena Andersson of the Social Democrats to form a new government after Sunday’s centre-left election victory.

Prime Minister Ulf Kristersson of the right-wing Moderates announced his resignationon Thursday after his four-party bloc suffered a narrow defeat.

“She has told me that she is ready to take on this task,” speaker Andreas Norlen told a press conference.

Andersson faces an uphill task uniting four opposition political parties, some of which have said they do not want to govern together or support a government they are not part of.

After meeting Norlen, she said Swedes had voted for a new direction.

“It is important that there is a government that does not seek to divide our people … but rather a government that works to unite Sweden and, in doing so, move the country forward,” she said.

Andersson became Sweden’s first woman prime minister in 2021 and served a 10-month term.

She said she wanted to build a broad coalition, but did not say which parties she expected to join her in government. She has aleady excluded any cooperation with the far-right Sweden Democrats.

Forming a government may take some time. After the 2018 election, it took a record 134 days for Social Democrat leader Stefan Lofven to win parliamentary backing.

The speaker can approach four candidates to form a government. If all are rejected by parliament, the outgoing government stays on in an interim capacity until a new election is held within three months.