NICOLA Sturgeon caught Scotland off-guard by announcing she is to quit as First Minister – but her Government has faced frustration from inside and outside the SNP for some time.

The majority of her current and former political foes have praised the FM’s shift in office, with no suggestion that she is taking an early cut.

The First Minister insisted that she had been toying with the decision for weeks.

Read more: Nicola Sturgeon resigns — LIVE

She was also quick to bat away any suggestion that the last few months had gotten the better of her.

In her opening remarks yesterday, Ms Sturgeon stressed that she has “plenty of experience to draw on” when it comes to “navigating choppy waters”.

That is true to an extent. She has been in power for eight years, while her party has been the only show at Holyrood since 2007.

Ms Sturgeon was able to almost laugh off ludicrous calls for her to quit amid the Alex Salmond inquiry and maintain an impressive level of popularity with the public.

Read more: Ash Regan expected to enter SNP leadership race

Ms Sturgeon said that “if it was just a question of my ability or my resilience to get through the latest period of pressure”, she would have jacked it in long before now.

She insisted that the “decision comes from a deeper and longer-term assessment” adding that she has “been wrestling with it – albeit with oscillating levels of intensity – for some weeks”.

But the last few months have been anything but a breeze for the First Minister and her government.

After walking the last Holyrood election in 2021, the SNP along with the Greens, now a fully-fledged government partner, had hit a crossroads with its vision for independence.

Having been pushed back a countless number of times by prime minister after prime minister, Ms Sturgeon threw the dice on her most costly gamble of her premiership – pre-empting court action by the UK Government on whether Holyrood could hold its own referendum.

The Supreme Court was stark in its judgment – telling the Scottish Government it is outwith devolved competence to hold a referendum without the permission of UK ministers.

Read more: 'Nicola Sturgeon's resignation will boost Labour government chances'

To make matters worse, her plan B to use the next UK general election as a de facto referendum, is a car crash waiting to happen.

But the independence campaign grinding to a halt has not in itself meant that the time is right for the First Minister to call it a day.

Ms Sturgeon drew widespread acclaim for how she handled the pandemic – utilising her stellar communication skills while those in Downing Street were floundering in getting the most basic public health messages across.

But the National Health Service, under her leadership, has never been in a worse state.

Waiting times have spiralled out of control, mental health services are in chaos, albeit hindered by the pandemic – but the Scottish Government and the First Minister have their neck on the line with it comes to the health of the NHS.

Similarly, the First Minister made education and closing the attainment gap her number one priority, labelling it her “defining mission”.

But this gap has not closed and the FM has been accused of not treating it with the importance it deserves.

The Scottish Government has risked becoming a laughing stock over its failure to build two lifeline ferries, while the Highlands communities have understandably felt completely abandoned by the decision to row back on a pledge to dual the A9.

Read more: Feel sorry for Nicola Sturgeon? Oh do gie's peace

Party politics are important to some, but nothing cuts through to the public like the basics not working.

The First Minister’s gender recognition reforms, a simple piece of administrative legislation to make the process for trans people to obtain a gender recognition certificate easier, was always going to create a chasm within the SNP.

The debate saw her lose a minister in Ash Regan and she could have lost her Finance Secretary and potential successor Kate Forbes, who is also reportedly sceptical about the proposals.

But it has been the fallout from the gender recognition reforms, and the self-inflicted row over transgender prisoners, that has potentially called Ms Sturgeon’s judgement into question.

The First Minister is a politician without comparison – she does not make howlers, there have never been any ‘gotcha’ moments.

Ms Sturgeon sat through hours of scrutiny over the Salmond affair by a Holyrood committee and emerged almost entirely unscathed.

Like all politicians, Ms Sturgeon will sometimes say nothing when it is better, politically, to do so.

But the Scottish Government’s two u-turns over transgender prisoners and remarks made personally by Ms Sturgeon, has turned the row into a disaster for the SNP.

She told Douglas Ross that she did not have enough information as to whether convicted transgender rapist Isla Bryson was a man or a woman.

The FM finally cracked, admitting that it was almost certainly the case” that the double rapist is not truly transgender.

Ms Sturgeon then referred to Bryson as a woman at a press briefing, and caught on the backfoot, warned against “headline-generating” perspectives.

The First Minister may have pointed to these remarks in her speech yesterday – stating that due to the focus on her, “statements and decisions that should not be controversial at all quickly become so”.

She added that “issues that are controversial end up almost irrationally so”.

Ms Sturgeon said: “It has always been my belief that no one individual should be dominant in any system for too long.”

The fury over transgender prisoners has led to the Scottish Government and Ms Sturgeon, not sticking to her guns.

By shifting from the original position Justice Secretary Keith Brown was initially sent out to defend, backing the Scottish Prisons Service from carrying out risk assessments on each trans prisoner and having faith in them to protect all inmates, the perception has been that Ms Sturgeon has caved to intense pressure from opponents and risked further stigmatising trans people.

More problems lie ahead for the Scottish Government.

The deposit return scheme, if it indeed launches on August 16, will throw up a number of problems and lack of planning with the scheme.

The First Minister has rubbished suggestions that the heat has got too much for her in recent months – but with a host of domestic headaches and an independence campaign going nowhere, picking a rare year without an election to call it a day, makes sense.