Swedish Prime Minister Stefan Lofven resigned Wednesday, paving the way for the country, a gender-equality champion, to finally have a woman prime minister.

Magdalena Andersson, the current finance minister, was elected to replace Lofven as the head of the Social Democratic Party last week, putting her on track to becoming premier if she wins a vote in parliament expected next week.

Lofven this summer said he would step down in November to give his successor enough time to prepare for the September 2022 general election.

The Social Democrats need the support of both their Green Party coalition partners and the Left and Centre parties to elect a new prime minister.

The Centre Party Wednesday said it would back Andersson, and the Left is expected to do the same.

Lofven, who is to remain as caretaker premier until his replacement, said he expected parliament to elect Andersson relatively smoothly.

"The Swedish people want a quick transition," he told reporters after his resignation.

Installing the first woman as prime minister sounds almost anachronistic in a country that has long championed gender equality.

All other Nordic countries -- Norway, Denmark, Finland and Iceland -- have seen women lead their governments.

The change in the Social Democrats' leadership comes as the party hovers close to its lowest-ever approval ratings with elections less than a year away.

The right-wing opposition, led by the conservative Moderates, has in recent years inched closer to the anti-immigration Sweden Democrats and hopes to govern with its informal backing.

Swedish Prime Minister Stefan Lofven hands in his resignation letter to the speaker of parliament
Swedish Prime Minister Stefan Lofven hands in his resignation letter to the speaker of parliament TT NEWS AGENCY via AFP / Anders WIKLUND

A former welder and union head, Lofven, 64, came to power in 2014, leading the Social Democrats to election victory after eight years in opposition.

"Stefan Lofven was never considered a visionary leader for the future. He was needed when the party was in trouble, and he did the job," Anders Sannerstedt, political science professor at Lund University, told AFP.

After being confirmed as the new party leader last week, Andersson, a former junior swimming champion often described as a "pragmatic" politician, outlined three political priorities going forward.

She said she wanted to "take back democratic control of schools, healthcare and elderly care", and move away from welfare sector privatisation.

She also said she aimed to make Sweden a worldwide role model in climate transition.

And she vowed to end the segregation, shootings and bombings that have plagued the country in recent years, usually due to rival gangs settling scores or organised crime battling over the drug market.

The violence has mainly hit disadvantaged neighbourhoods with large immigrant populations, but has increasingly spilled over into other areas.

In 2020, 47 people were killed in 366 shootings in the country of 10.3 million people, according to official statistics.

There were also 107 bombings and 102 attempted detonations.

Crime and immigration are expected to be among Swedes' main concerns in next year's election.

Sannerstedt, the analyst, predicted it would be a "very tight race".

"The Social Democrats need to come up with some new policy ideas" if they want to win the election, he said.

But "Andersson is more a technocratic bureaucrat than a visionary creative leader", he said.

She "has worked closely together with Lofven for seven years. I expect no major changes."