John Swinney is facing a “tough job” as Scotland’s new First Minister because the SNP lacks a majority at Holyrood, one of his predecessors has warned.

Alex Salmond urged the new SNP leader to recall his time as finance secretary when he was in office at Bute House, during which time Mr Swinney had to make deals with parties across the chamber to win support for the Scottish budget.

As Mr Swinney was sworn in to the top job in Scottish politics on Wednesday morning, Mr Salmond told the PA news agency: “He’s got a tough job on with the parliamentary arithmetic.”

Recalling the cross-party work by Mr Swinney as finance secretary, the former SNP leader added: “He needs to go back to recalling these days.

As finance secretary in the first SNP government, John Swinney, left, worked closely with then first minister Alex Salmond (Danny Lawson/PA)

“We will have to see if John can recover his knack of 2007 to 2011, as opposed to more recent manifestations.”

Claiming the Greens, who until two weeks ago were part of the Scottish Government thanks to a powersharing deal with the SNP, had “developed a sense of entitlement”, Mr Salmond also advised the new First Minister to “redirect” his policies “to the people’s priorities and redirect away from the Green hobby horses”.

Mr Salmond now leads the rival pro-independence Alba Party and he suggested its sole MSP Ash Regan could be a key ally for Mr Swinney, saying he should send his Government whips to “beat a path to Ash Regan’s door”.

Ms Regan voted for Mr Swinney to become First Minister when MSPs were balloted on who should succeed Humza Yousaf in the post on Tuesday.

Mr Salmond said that vote had been a “generous sign of good will”.

With Mr Yousaf stepping down after his decision to end the powersharing deal with the Greens left him likely to lose a vote of no confidence in his leadership, Mr Salmond noted: “Ash Regan has one vote, but every vote is important. And one vote can stop motions of no confidence in this Parliament.”