Nicola Sturgeon shocked the country when she announced her resignation as Scotland's first minister this time last year.

The aftermath of her exit saw a fiery leadership battle, a police investigation and a looming general election.

Here is how the year went for the SNP following her resignation:

- February

Nicola Sturgeon resigns: A month prior to her shock resignation, Scotland's longest serving first minister told broadcasters she had "plenty left in the tank" as leader.

But she closed the chapter on her tenure in charge after more than eight years in the job, on February 15 2023.

READ MORE: Yousaf heads to Qatar for holiday after Cabinet reshuffle

Leadership contest: Three high-profile MSPs came forward to succeed her: then health secretary Humza Yousaf; then finance secretary Kate Forbes; and former minister Ash Regan, who had quit the Government in opposition to gender law reform plans.

It sparked a heated contest and revealed internal party divides for the first time.

Significant divisions emerged with the two front runners, Mr Yousaf and Ms Forbes, both taking aim at the other's record in government and social views.

- March

Peter Murrell: The SNP's then chief executive, Peter Murrell, who is married to Ms Sturgeon, resigned from his position after he provided the party's head of communications, Murray Foote, with false SNP membership figures.

READ MORE: Who is Peter Murrell, the former SNP chief executive?

Humza Yousaf becomes First Minister: Mr Yousaf took 52% of the vote in the second round to Ms Forbes' 48%, with Ms Regan placing third.

- April

Operation Branchform: Just days after Mr Yousaf took office, Mr Murrell was arrested by police in connection with the probe into the SNP's finances.

Officers erected a forensic tent outside the former first minister's home that she shares with Mr Murrell, with the house and garden searched.

READ MORE: Operation Branchform: Complainer demands action on probe

Mr Murrell was questioned for almost 12 hours before being released without charge pending further investigation.

The party's Edinburgh headquarters was also searched and a motorhome was seized from the Fife home of Mr Murrell's 92-year-old mother.

Former party treasurer, Colin Beattie, was also later arrested and released without charge.

On the same day as Mr Beattie's arrest, Mr Yousaf delivered his first major speech as First Minister, announcing his vision for government.

- May

Child poverty: Scotland's then children's commissioner, Bruce Adamson, took aim at the former first minister's efforts to tackle the issue and mental health.

He said Ms Sturgeon's government had "absolutely failed" in the task to reduce child poverty.

During her resignation, Ms Sturgeon cited her record on supporting young people as a proud moment in her career.

- June

Sturgeon arrested: The former first minister was then arrested in connection with the police's SNP finance probe, but was later released without charge pending further investigation.

She told journalists following the arrest: "I am certain I have done nothing wrong."

- August

Memoir: Nicola Sturgeon confirmed she was writing a "deeply personal" book on her life as she rose from a working class Ayrshire family to the head of Scotland's government.

Rutherglen and Hamilton West by-election: The SNP faced their first electoral test since Ms Sturgeon's resignation after a recall petition was successful against former SNP MP Margaret Ferrier, who breached coronavirus lockdown rules.

The SNP's candidate, Katy Loudon, battled against Labour's Michael Shanks for the Westminster seat, with polls predicting a tough result for the SNP.

- October

Time Magazine: Ms Sturgeon's successor, Humza Yousaf, was on the cover of the magazine as a "trailblazer" shaping the future.

By-election result: Labour's Michael Shanks won the Rutherglen and Hamilton West by-election by more than double the votes of his SNP opponent - a tough defeat for First Minister Humza Yousaf.

Mr Yousaf said the result meant his party had to "reflect" on regaining the trust of voters.

Defections: The former SNP MP Lisa Cameron quit the party she described as "toxic" to defect to the Tories. Later in the month, former minister Ash Regan would leave to become the Alba Party's first MSP and Holyrood leader.

SNP conference: Humza Yousaf made his first address as leader, confirming the party's shift away from a "de facto referendum" onto the Westminster election strategy of winning a majority of seats.

Mr Yousaf denied his conference speech was overshadowed by the presence of Ms Sturgeon.

UK Covid-19 Inquiry: An inquiry lawyer said the "majority" of informal messages had not been retained by the Scottish Government, with ministers pledging to hand over more than 14,000 WhatsApps to the investigation.

- December

Gender reforms: The Court of Session upheld the UK Government's decision to block the gender recognition Bill - a policy introduced by Ms Sturgeon.

- January 2024

Covid inquiry: An emotional Ms Sturgeon gave tearful evidence to the UK Covid Inquiry's Edinburgh heading as she spoke of policy regrets.

She admitted WhatsApp messages were deleted but insisted it was in line with Scottish Government guidance and all salient points were added to the official record.