Sweden's centre-right opposition and the far right ousted Prime Minister Stefan Lofven in a vote of no-confidence on Tuesday, as the left and right blocs wrangle over who can form a new government after neither won a majority in September 9 elections.

Lofven's departure was widely anticipated. Since election night the head of the four-party centre-right Alliance, Ulf Kristersson, has insisted he intends to try to form a government.

With neither bloc able to build a majority, the far-right, anti-immigration Sweden Democrats, who won almost 18 percent of votes in the election and are the country's third-biggest party, have demanded to be given influence over Swedish politics in exchange for support in parliament.

But neither the left nor right has been willing to negotiate with the Sweden Democrats.

‘Sweden needs a new government that has broad political support to undertake reforms,’ Kristersson told parliament moments before the confidence vote Tuesday.

A total of 204 of 349 members of parliament voted against Lofven, while 142 voted in favour.

- 'Unknown territory' -

The Dagens Nyheter newspaper said in an editorial Tuesday that Sweden's fragmented political landscape, the slow decline of social democracy and the rise of political extremes had pushed the traditionally stable and consensus-oriented country into ‘unknown territory’.

Parliament wrote a ‘new page in Sweden's political history’ by voting out a prime minister without an alternative ready to govern, wrote the country's other main newspaper, Svenska Dagbladet.

The speaker of parliament, Andreas Norlen, will begin talks on Thursday with the leaders of the eight parties represented in parliament to determine who is best placed to form the next government.

Norlen, a member of Kristersson's conservative Moderate Party, is widely expected to task Kristersson with the job.

But the road ahead is tricky.

A collaboration with the Sweden Democrats would give the Alliance the majority it needs, but since that option is unthinkable for two Alliance parties -- the Liberals and the Centre -- Kristersson has so far refused to go down that route.

Lofven's leftwing bloc holds 144 parliamentary seats, just one more than the Alliance. The Sweden Democrats have 62 seats.

The leftwing bloc is made up of the Social Democrats and the Greens, who have ruled together with the informal support of the ex-communist Left Party since 2014.

The Social Democrats posted their worst election result in more than a century, but remain Sweden's biggest party, far ahead of Kristersson's Moderates and the Sweden Democrats.

Lofven will stay on as prime minister in a caretaker role until a new government is in place, which could take weeks.

- Ousted PM's warning -

After his ouster, Lofven issued a stark warning to the Alliance about cooperating with the Sweden Democrats.

‘If the Alliance chooses to govern as the smaller bloc they will be totally dependent on the Sweden Democrats,’ he said.

‘The Sweden Democrats were founded by neo-Nazi members of the Swedish white supremacy movement. They have repeatedly been found to have ties to racist and neo-Nazi organisations.

‘All eyes are now on the Alliance's big election promise to the Swedish people that it would never govern with the support of the Sweden Democrats.’

The Sweden Democrats said Tuesday that it was ready ‘to negotiate, cooperate, and talk with all parties’.

‘But we will bring down any attempt to form a government that does not give us any influence,’ party leader Jimmie Akesson warned.

Since it has ruled out the far right, the Alliance has instead invited the Social Democrats to a cross-bloc cooperation.

While Lofven himself has been a fervent champion of cross-bloc politics, he has rejected any Social Democratic support for an Alliance minority government.

The Social Democrats are the country's biggest party and will ‘never be a support party,’ he reiterated Tuesday.

Lofven has meanwhile courted the Centre and Liberal parties. If the Alliance fails to form a government, they could possibly switch to Lofven's side, observers say.

The speaker of parliament has four attempts to designate a party leader to build a government. After that, new elections have to be called.