Swedish Prime Minister Stefan Lofven on Tuesday lost a no-confidence vote in Parliament and will step down from the post, reported the BBC. With the far-right Sweden Democrats supporting the poll to remove him, 204 MPs voted against Lofven while 142 voted in his favour.

Lofven is expected to stay on as a caretake prime minister until a new one is elected, a process that could take weeks. Speaker Andreas Norlén will start discussions with party leaders on Thursday, reported Reuters.

The vote came weeks after the elections in the country delivered a hung Parliament. Neither the ruling centre-left nor the centre-right blocs won a majority. The far-right Sweden Democrats made big gains, becoming the country’s third-largest party. The bloc led by Lofven’s Social Democrats party won 40.6% of votes, or 144 seats, while the Moderates’ bloc had 40% of votes, or 143 seats.

Speaker Norlén could turn to Ulf Kristersson, leader of the biggest Alliance party, the Moderates, to form a new administration. Kristersson will need support either from the Sweden Democrats or the centre-left as he does not have a majority.

However, the anti-immigration Sweden Democrats have threatened to block any move to form the government unless they are given a say in policies. “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,” said party leader Jimmie Akesson.

If Kristersson fails to form a government, the speaker could again reach out to Lofven, who is still the leader of the biggest party in Parliament.