NICOLA Sturgeon has paid tribute to Ian Blackford as the SNP’s Westminster leader marked his last day in office. 

The First Minister took to Twitter to say “thank you” to the Ross, Skye and Lochaber MP who last week announced that he was not going to stand in the parliamentary group’s annual leadership election. 

He tweeted: “Today is my last day in office for @theSNP as Westminster leader. Thank you to colleagues for the opportunity to serve both MPs and staff as well as all those who have supported and encouraged me. Good luck to my successor as look I forward to my next challenges.”

Ms Sturgeon replied to say “thank you.”

Sources expect the result - due to be announced tonight between 7pm and 8pm - to be close.

Stephen Flynn had been the frontrunner. However, despite working behind the scenes for months, the Aberdeen South MP’s campaign has been blighted by unforced errors.

First, there was a failed push three weeks ago, when he informed party officials of his plan to challenge for the leadership, before later tweeting he had “no intention of standing” after details appeared in The Times.

He had reportedly been urged by party bosses to stand down to avoid overshadowing the Supreme Court ruling on whether Holyrood could unilaterally hold an independence referendum. 

Nevertheless, despite ruling himself out, within minutes of Mr Blackford’s resignation last Thursday, Mr Flynn was already thought a shoo-in for the position, with many of his parliamentary colleagues expecting tonight’s AGM to be a coronation rather than a contest.

He met with the First Minister in Bute House on the same day, with the two reportedly discussing the MP’s leadership plans and how their relationship would work.

However, the next day MPs were furious after a campaign source told media that he was preparing for a “clear out” and was going to sack just about every member of the frontbench team.

That was compounded yesterday when reports suggested he had picked Mhairi Black as his deputy.

Though widely admired by SNP supporters she is not universally popular in the group, who doubt whether she would have the enthusiasm necessary for a job that is largely behind the scenes and managerial.

One source told The Herald they could not understand why Mr Flynn had picked her as a running mate: “His only electorate are the MPs so she’s not adding anything to his argument there. It might play well with a section of members who like to see her slapping it into the Tories but that’s not much use.”

Meanwhile, Alison Thewliss – who is close to Ms Sturgeon and unexpectedly announced her leadership bid on Saturday night – has named Cumbernauld, Kilsyth and Kirkintilloch East MP Stuart McDonald as her pick for deputy.

In another blow to Mr Flynn, he is part of the so-called Tuesday Club faction.

Initially set up as a regular five-a-side night, it quickly became a thorn in the side of Ian Blackford and played a critical role in his eventual downfall.

One ally of Ms Thewliss said Mr McDonald’s loyalty was to the party. “He’s not in factions, wings and all the rest of it,” they said

They added that while he had been “in” the Tuesday Club, he was not “of” the Tuesday Club. “I think he is just there for the football and the pint. He’s definitely not part of an internal power struggle.”

One of Mr Flynn’s backers told the Times that they were concerned by Mr McDonald breaking for Ms Thewliss. “I think he’s been lazy about it and thought he had it in the bag.”

MPs will vote for the new leader this evening at the group’s annual general meeting following a “valedictory” speech from Mr Blackford.

Mr McDonald said he was “humbled” to be asked to be Ms Thewliss’s deputy.

“As deputy leader of the group, I’ll work with Alison, to build a strong focused Westminster team that works in collaboration with colleagues, right across the party. We’ve got a big job ahead. Let’s get it done.”

A source on Ms Thewliss’s campaign team described Mr McDonald as a “clear thinker, an absolute workhorse.”

“He’s a grafter, not at all a showman,” they added. “What you need in a deputy leader to be blunt is somebody who’s going to be the first person in in the morning, and the last person to leave at night.”

With tonight's ballot being done electronically rather than by hand as in previous years, most SNP MPs are keeping their choice to themselves.

Only a handful responded when asked by The Herald who they would be supporting. 

Glasgow South West MP Chris Stephens told us he would be backing France.