When she steps down at next year’s Scottish Parliament election, Nicola Sturgeon will have spent 27 years as an MSP and made history as the first woman to become Scotland’s first minister.

She was also the longest-serving incumbent in that post – dealing with no fewer than five different Conservative prime ministers during her time in the job.

Just a week after she tendered her resignation as first minister to the King, her then husband – and former SNP chief executive – Peter Murrell was arrested in relation to a police investigation into the SNP’s finances.

Outgoing First Minster of Scotland Nicola Sturgeon signs her official resignation letter to the King (Jane Barlow/PA)

Ms Sturgeon was arrested months later in relation to the same probe, as was former party treasurer Colin Beattie, and both were released without charge pending further inquiries.

Mr Murrell was re-arrested and charged last year in connection with the alleged embezzlement of party funds.

In January, Ms Sturgeon announced she and Mr Murrell had “decided to end” their marriage.

She joined the SNP aged 16 and became first minister in November 2014 after her predecessor, Alex Salmond, stood down in the aftermath of the independence referendum that year – which saw Scots vote by 55% to 45% to stay part of the UK.

Such was her popularity that, just after taking over as SNP leader, she addressed a sell-out crowd at Glasgow’s Hydro – an achievement usually reserved for pop and rock stars.

Nicola Sturgeon speaking at the rally at the SSE Hydro in Glasgow (Andrew Milligan/PA)

Membership soared, so that at one point under her leadership the party was the second largest in the UK, and in the 2015 general election the SNP enjoyed record-breaking success, winning all but three of the 59 seats up for grabs north of the border.

Ms Sturgeon used her time as first minister to champion causes such as women’s equality, the plight of youngsters in care, and climate change, declaring back in 2019 that the latter issue was an “emergency” the world’s political leaders needed to tackle.

Her time in the top job saw Glasgow host the Cop26 UN summit, insisting that the agreement reached there represented “progress” in tackling the issue.

That summit took place in November 2021, having been delayed by a year because of the Covid-19 pandemic, which saw Ms Sturgeon widely praised for her approach, with the then first minister holding daily briefings to update Scots throughout much of the pandemic.

Her approach was contrasted with that of Boris Johnson, who was prime minister at the time, and who ended up being given a fixed penalty notice for breaching lockdown rules.

Nicola Sturgeon led frequent briefings during the coronavirus pandemic (Scottish Government/PA)

Leading the country through Covid is “by far the toughest thing I’ve done”, Ms Sturgeon said, when she announced her resignation.

She spoke then of the “brutality” of life as a politician, as she insisted the “time is now” for her to go.

That decision came after almost 24 years in the Scottish Parliament – she was amongst the MSPs elected in the first Holyrood elections in 1999 – and nearly 16 years in government.

Nicola Sturgeon was one of the inaugural 1999 intake of MSPs at Holyrood (Ben Curtis/PA)

When the SNP narrowly won the 2007 Holyrood election, Mr Salmond became first minister with Ms Sturgeon, who was depute leader of the party, becoming the deputy first minister.

While she led the SNP to electoral success – the party won every election in Scotland during her spell in charge – critics questioned her record.

She famously said people should judge her on her record on closing the attainment gap in Scotland’s schools, with her opponents insisting she failed to make enough progress on this.

The controversial issue of gender recognition reform, which was championed by Ms Sturgeon, divided her party and attracted a storm of criticism from women’s rights campaigners.

Meanwhile, sexual harassment allegations brought against Mr Salmond saw her relationship with the man who had been her political ally and mentor crumble.

And while Mr Salmond was cleared of all the criminal charges brought against him, a Holyrood committee was set up to probe the Scottish Government’s handling of the allegations after the Court of Session ruled that this had been unlawful- with Ms Sturgeon grilled by the committee for the best part of a day.

An independent review later cleared the then first minister of breaching the ministerial code but the cross-party committee found by majority that she had misled the Parliament.

Her tenure as first minister brought Scotland no closer to independence, with the UK Supreme Court ruling in November 2022 that the Scottish Parliament did not have the powers to hold a second referendum without the consent of Westminster.