Sweden’s parliamentary speaker on Tuesday gave a center-right bloc of parties two weeks to form a government, granting its leader a broad mandate that he may struggle to fulfill following inconclusive national elections.

The opposition four-party Alliance won 143 seats in the 349-seat legislative chamber in the September 9 ballot, one fewer than the center-left bloc headed by the Social Democrats.

Both blocs face a daunting task to form a government, having ruled out cooperating with the anti-immigration Sweden Democrats, which hold the balance of power with 62 seats, and also considered unlikely to team up with each other.

“The parties have to rethink their positions in order for a government to be formed,” Speaker Andreas Norlen said. “I am the speaker, not a magician.”

Norlen said Alliance leader Ulf Kristersson, whose Moderates are the biggest party in the bloc, had on balance a stronger case to be given the mandate than caretaker Prime Minister and Social Democrat leader Stefan Lofven.

Kristersson did not rule out cooperating with Lofven.

“I will talk to the Alliance and the Social Democrats. That is where my focus will be. I will do all I can to build an Alliance government,” Kristersson told reporters.

Lofven said it was logical for Kristersson to get the first shot at forming a government, but repeated that he would not back the Alliance in government.

Kristersson had two weeks to report on whether he had been successful and was not limited to forming a government with just his Alliance allies, Norlen earlier told reporters after meeting all party leaders during the day.

In Sweden, a prime minister can assume office as long as a majority in parliament does not vote against him or her.

The Sweden Democrats have said they will vote against any government that does not give them influence over policy while Lofven has ruled out supporting an Alliance government.

Should Kristersson fail to form a government, the speaker will almost certainly ask Lofven to try.

The Social Democrats, who have dominated Swedish politics for the last 100 years, hope to prise the Center and the Liberal parties out of the Alliance and get their support.