SCOTTISH Labour was thrown into crisis last night after leader Richard Leonard dramatically announced he was quitting – just months ahead of the Holyrood election in May.

Senior party insiders said they had no idea Leonard was going to resign after seeing off an attempted coup by a group of MSPs last year.

“This has completely come out of the blue,” one source told The National.

“He always insisted he would stay on as leader until the 2021 Scottish Parliament election.”

The dramatic development followed persistent internal fighting and speculation over his leadership, poor opinion poll ratings for his party and a devastating 2019 General Election which saw Scottish Labour left with just a single MP.

A Savanta ComRes poll, published yesterday, showed Labour voters switching to the SNP based on the Scottish Government’s response to the pandemic.

READ MORE: New Yes poll shows support for independence is still sky-high

The survey – the 18th in a row to record majority support for independence – found more than a third of 2019 Labour voters are more likely to vote for the SNP in what is expected to be an historic election in May with the SNP 35 percentage points ahead of Labour in the constituency vote.

In a resignation statement, Leonard attacked the Scottish and UK governments’ handling of the pandemic and argued “Scotland needs a Labour government now more than ever before”. He went on to say speculation over his leadership was a distraction to the party’s ability to get its message across.

“Both governments have mishandled its response to Covid, with devastating consequences not least in our care homes. It is essential now that we have an accelerated vaccine roll-out – 24 hours a day, seven days a week – to ensure that the most vulnerable and frontline workers are protected against Covid, and that the general population is given greater protection as quickly as possible after that,” he said.

READ MORE: Here are five of Richard Leonard's worst gaffes as he quits as Labour leader

“I have thought long and hard over the Christmas period about what this crisis means, and the approach Scottish Labour takes to help tackle it.

I have also considered what the speculation about my leadership does to our ability to get Labour’s message across. This has become a distraction.

“I have come to the conclusion it is in the best interests of the party that I step aside as leader of Scottish Labour with immediate effect. This was not an easy decision, but after three years I feel it is the right one for me and for the party.”

Nicola Sturgeon was among the political opponents who responded to Leonard’s announcement.

She wrote on Twitter: “Despite our political differences, I’ve always liked Richard Leonard. He is a decent guy and I wish him well for the future.”

SNP depute leader Keith Brown also wished Leonard well and added that his party would have to change its anti-independence message to win greater support.

“This will have been a difficult decision to make. On behalf of the SNP, and on a personal level, I sincerely wish Richard Leonard all the very best for the future,” said Brown.

“He clearly understands that voters in Scotland don’t want a Labour party which lines up behind Boris Johnson and signs up for a hard Brexit which threatens Scotland’s economy and future prosperity.

“Unless Scottish Labour stop parroting Tory anti-independence rhetoric and start listening to the democratic wishes of the majority of people in Scotland – who believe that decisions should be made by governments entirely elected in Scotland – they will continue to alienate even their own supporters and slide further into irrelevance, regardless of who leads them.”

Scottish Greens co-leader Patrick Harvie wished Leonard all the best, adding: “Scottish Labour could now field an entire football team of former leaders and acting leaders.

“The party has spent almost the entire devolution era fighting among itself, all the while letting down Scotland’s working class communities.

“Many Labour members have understandably become utterly disillusioned with their party’s constant infighting.”

Leonard was elected Scottish Labour leader in 2017, defeating Anas Sarwar in a bitter three month long contest. His decision to go leaves Scottish Labour looking for its fifth leader since the independence referendum in 2014 – with Johann Lamont, Jim Murphy and Kezia Dugdale all having held the job since then.

Deputy leader Jackie Baillie’s has been announced as the party’s interim leader.