Sweden's parliament on Monday re-elected Moderate Party leader Ulf Kristersson as prime minister, ending a 78-day deadlock over who would form a government after the September 13 general election.

Lawmakers voted 127 in favour, 158 against and 63 abstentions, with one member absent. Under Sweden's parliamentary rules, a nominee is approved unless at least 175 of the 349 members vote against the nomination.

The breakthrough came on Sunday, when the Centre Party's leadership agreed to join a government led by Mr. Kristersson — a decision that divided the party's own lawmakers, seven of whom voted against him and two of whom abstained.

Mr. Kristersson will lead a minority coalition of his Moderates, the Centre Party, the Christian Democrats and the Liberals. The Sweden Democrats will allow the government to take office while remaining outside the cabinet.

The election had left parliament closely divided, with the centre-left bloc winning 176 seats and the right-wing bloc 173. Mr. Kristersson resigned after the vote, and Social Democratic leader Magdalena Andersson's bid to form a government stalled after the Centre Party refused to cooperate with the Left Party. Parliament rejected two earlier nominations for prime minister.

Ms. Andersson described the incoming government as “historically weak and unstable,” while Left Party leader Nooshi Dadgostar blamed the Centre Party for the collapse of talks on an alternative government. Mr. Kristersson is expected to present his government's programme to parliament on Friday, when the new cabinet is due to take office.