Sweden ended a four-month political vacuum Friday when lawmakers elected Prime Minister Stefan Lofven to a second term, after he elbowed out the far-right to save one of Europe's few left-wing governments.
Lofven ultimately made major concessions to the centre-right parties to win their support, notably pledging to introduce market rates for newly-produced rental housing and easing Sweden's strict labour laws.
Per capita, Sweden allowed more asylum seekers than any other European Union state in 2015.
"My ambition now is that the Sweden Democrats will be a dominating force in a new strong centre-right opposition", he said.
Three parties abstained in the vote, meaning there was not a majority against giving Lofven another term as leader of the country.
The Center and Liberal parties had previously been part of a four-party center-right opposition alliance.
"Lofven has reached his strategic goals: to remain in power and to split up the non-socialist Alliance opposition", political scientist Olof Petersson told AFP. To be elected as the prime minister, Lofven, a centre-left politician, did not need to secure a majority during the motion.
"More and more governments are becoming reliant on parties with an anti-democratic agenda", Löfven said after winning the vote in parliament.
Sometimes called a "rightwing socialist", Lofven will now have a hard time improving his image among his old socialist friends.
Lofven has already lost points in his own camp by shutting Sweden's borders to immigrants at the end of 2015, after welcoming more than 240,000 asylum seekers since 2014.
The Sweden Democrats - with roots in the white supremacist fringe - want a voice on immigration, welfare and crime policies as the price for supporting a new government and have been threatening to block any new government unless they are given a say in policy.
This comes after reports on January 14 said that speaker of the Swedish parliament Andreas Norlen gave leaders of political parties extra 48 hours to settle their disagreements before voting on the prime minister's candidacy.
If the alliance bid had failed, Sweden would have faced another round of elections.
He became a welder and spent 15 years working in a defence factory, joining the union in the early 1980s and ending up as head of the metal workers' union Metall from 2006 to 2012.