Swedish Prime Minister and Social Democrat party leader Stefan Löfven | Pontus Lundahl/AFP via Getty Images Sweden’s Löfven takes turn at forming new government Social Democrats are second in line to try to form a government, after the Moderates’ first attempt fails.

Sweden's caretaker Prime Minister Stefan Löfven has two weeks to try to form a governing coalition after the center right failed to win support in the wake of September's indecisive election.

Parliament's new speaker, Andreas Norlén, said Monday he had given the Social Democrat leader two weeks to test support from other parties, with instructions to get back to him by October 29 (and provide a progress report a week before that).

Sweden was plunged into unaccustomed instability after the September 9 election resulted in a difference of just one seat between Löfven's center left and the center right, led by Ulf Kristersson‘s Moderates. The far-right Sweden Democrats gained ground to finish in third place.

The prime minister then lost a confidence vote on September 25, after the Sweden Democrats voted with the conservatives, forcing the speaker of the Riksdag to set about brokering talks for a new government.

Norlén — a Moderate — gave Kristersson the first stab at forming a coalition, but his time ran out this weekend. Löfven said it is unlikely to be a quick or straightforward process. Under parliamentary rules, Norlén has four attempts to secure a deal, failing which a snap election must be called within three months.

"This is going to require humility and compromise from all parties," Löfven told reporters, adding that he understands why "people are irritated" that it is taking so long to give Sweden a new government.

The acting premier said he would speak to all the mainstream parties, including center-left groups allied to his Social Democrats and those from the Moderate-led Alliance. But he said he wouldn't consult the anti-immigrant Sweden Democrats, who have so far been ruled out as potential partners by both major parties.