STOCKHOLM (Reuters) - Swedish Prime Minister Stefan Lofven lost a no-confidence vote in parliament on Tuesday, with the anti-immigration Sweden Democrats threatening to block any new government unless they are given a say in policy.

The rise of the far right across Europe has forced many traditional parties into an uncomfortable choice of sharing power with populist forces or reaching out to long-standing opponents to keep them out.

Sweden, long seen as a bastion of liberal values and political stability, now faces the same choice with its center-left and center-right blocs evenly balanced after the Sept. 9 election and the Sweden Democrats holding the balance of power.

“Now the excitement will really start,” said Ulf Bjereld, political scientist at Gothenburg University. “The parties will have to show their true colors now.”

The Sweden Democrats have been shunned by all other parties since entering parliament in 2010, making any tie-up unlikely.

But if there is no viable government after four attempts by the speaker, then a new election would have to be called within three months, with the main parties likely to face a similar dilemma again.

Voters delivered a hung parliament in the Sept. 9 election when Lofven’s center-left bloc won 144 seats, one more than the center-right opposition Alliance.

The Sweden Democrats, a party that has its roots in the white supremacist fringe, got 62 seats and backed the Alliance in Tuesday’s vote, which was an obligatory test of the prime minister’s parliamentary support after an election.

A new government could take weeks or months - as was the case in Germany and Italy - to thrash out. The speaker will start discussions with party leaders on Thursday.

Slideshow ( 7 images )

“VERY COMPLEX”

After Lofven’s ousting, the speaker of parliament is now seen turning to Ulf Kristersson, leader of the biggest Alliance party, the Moderates, to try to form a new administration.

But lacking a majority, Kristersson needs support either from the Sweden Democrats, who want to freeze immigration and a vote on membership of the European Union, or the center left.

Neither choice looks viable.

“If the Alliance parties choose to try to govern as the smallest bloc, then they make themselves totally dependent on the Sweden Democrats,” Lofven said.

The Sweden Democrats want a voice on immigration, welfare and crime policies as the price for supporting a new government.

“We will do everything in our power to stop any attempt to form a government, do everything to bring down every government, which does not give us a reasonable influence in proportion to our electoral support,” SD party leader Jimmie Akesson said.

The Alliance of the Moderates, Centre, Liberal and Christian Democrats has said it will not negotiate with the party.

Slideshow ( 7 images )

Nevertheless, Moderate leader Kristersson said his chances of forming a government were good “for the simple reason that voter support for an Alliance government is much stronger than that for any other government”. “But, I am very conscious of the fact that the situation in parliament is very complex,” he said.

The only other alternative, support from the center left, has been ruled out by Lofven, who is hoping for another shot at being prime minister himself.

An Alliance government has only “slim chances” of being formed, Linnaeus University political scientist Magnus Hagevi said.

Despite the uncertainty, markets barely reacted on Tuesday.

Sweden’s economy has enjoyed strong growth for years and government finances are strong. Economic policy is unlikely to shift radically under a new government and there is broad agreement about the need to tackle structural problems in areas such as housing and the labor market.

The crown has strengthened since the election.

If Kristersson fails to form a government, the speaker could turn once more to Lofven, still the leader of the biggest party in parliament, the Social Democrats, who have dominated Swedish politics for decades.

“I want to lead a government that has broader support in the country’s parliament and that allows us to leave stalemate of bloc politics,” Lofven said after the no-confidence vote.

Lofven hopes that the aversion the Centre and Liberal parties have for the Sweden Democrats will outweigh the political differences they have with his Social Democrats.

Swedish election scenarios graphic: tmsnrt.rs/2p45tJh