(Bloomberg) -- John Swinney was elected Scotland’s First Minister, as his governing Scottish National Party seeks to arrest a long-term slide in the polls ahead of a UK-wide vote expected in the second half of the year.

Swinney, 60, will now lead a minority government in the devolved Scottish parliament after his predecessor, Humza Yousaf dramatically aborted a power-sharing deal with the Scottish Greens that ultimately led to the former first minister resigning just over a week ago. Swinney’s appointment was confirmed on Tuesday when the Greens abstained from voting, as expected.

Read more: Scottish Nationalists Look to Old Hand After Leadership Turmoil

The new first minister, the right-hand man of long-time leader Nicola Sturgeon, now has the task of uniting his fractured party following a string of scandals, unpopular policies and unforced errors. His former boss’s departure last year — as well as the charges against her husband over alleged embezzlement of party funds — have cast a shadow over the SNP that Yousaf struggled to shift.

The challenge is compounded by the fact that Swinney will need to rely on the support of opposition parties to pass legislation, after the SNP fell one short of a majority at the last Scottish election. The agreement with the Greens was meant to sort that, but it was the source of significant tensions within the SNP prior to Yousaf ending it — a miscalculation that triggered his downfall.

Swinney was elected SNP leader unopposed on Monday as the party tried to avoid the type of internal divisions laid bare in the contest to replace Sturgeon, which was won by Yousaf just over a year ago. 

In the months since, the opposition Labour Party has soared in the polls at the SNP’s expense, boosting leader Keir Starmer’s chances of ousting the Conservative Party from UK power at a vote likely in the autumn.

Swinney is expected to be formally sworn in at the Court of Session in Edinburgh on Wednesday. 

©2024 Bloomberg L.P.