Sweden’s centre-right parties and the far-right Sweden Democrats have combined to oust the country’s prime minister, Stefan Löfven, in a mandatory no-confidence vote after elections that left neither main political bloc with a majority.

The move means Löfven, whose centre-left bloc won 144 seats in parliament on 9 September to the centre-right’s 143, will have to step down eventually but will stay on in a caretaker capacity until a new administration can be formed, which could take weeks.

The speaker of the parliament, Andreas Norlén, is expected to meet the leaders of the eight parties represented in Sweden’s Riksdag over the next few days to determine who is best placed to try to piece together the country’s next government.

Most analysts expect Norlén to first approach Ulf Kristersson, the leader of the Moderate party, the largest member of the four-party centre-right Alliance.

“Sweden needs a new government that has broad political support to undertake reforms,” Kristersson said moments before Tuesday’s vote, which passed by a majority of 59 in the 349-seat house.

Quite where Kristersson might get that support from, however, is far from clear. With his centre-right grouping of the Moderate, Centre, Liberal and Christian Democrat parties in a minority, he will need the support of either the centre-left or of the anti-immigration Sweden Democrats, whose 62 MPs backed the no-confidence motion.

However, the Sweden Democrats have been shunned by all other Swedish political parties since entering parliament in 2010 because of their roots in the neo-Nazi movement, a policy Kristersson has pledged to maintain. Löfven’s Social Democrats have ruled out backing an Alliance government.

The Sweden Democrat leader, Jimmie Åkesson, repeated on Tuesday that his party would not hesitate to bring down any government that did not give it a say on policies touching on its core concerns of immigration, healthcare, pensions and crime. “If Ulf Kristersson wants to be prime minister, it can only happen with my help,” he said.

The speaker has four attempts at finding a new government to replace Löfven’s centre-left coalition of Social Democrats and Greens, who have ruled together, with the informal parliamentary support of the former communist Left party, since 2014.

If deadlock persists, new elections must be held within three months, an eventuality most analysts think unlikely because the parties’ vote shares would probably not change by much.

With all potential cross-bloc coalitions or support deals coming at a heavy political cost for those involved, thrashing out an agreement is widely expected to take weeks or even months.