The First Minister said she is “overwhelmingly proud” of what her Government has achieved adding: “Being first minister of the country I love has been a profound honour." after her final 286th FMQs.
Three years to the day from the start of the first coronavirus lockdown, she told how she had “led Scotland through good times but also through the toughest period of our recent history”.
The experience of the pandemic “changed me”, she said, telling MSPs that her thoughts “today and always are with those who lost loved ones to Covid” as well as others still suffering as a result of the virus.
Speaking about the experience of the pandemic, she said: “In the toughest of times, our country showed the best of itself with love, care and solidarity.
“That will live with me forever.”
Ms Sturgeon – Scotland’s first female first minister and also the longest serving incumbent in the post – described the job as “challenging, exhilarating and exhausting”.
And as the first female in the top role in Scotland, she said: “As the first woman to hold this office, advancing gender equality has also been very close to my heart.”
She added: “No girl in our country now has any doubt that a woman can hold the highest office in the land” adding: “When women lift girls rise”
The First Minister held back tears as she delivered a final thank you to the people of Scotland saying: “Whether you voted for me or not… thank you so much for placing your trust in me.
“Words will never adequately convey the gratitude and the awe I hold in my heart for the opportunity I have had to serve as your First Minister.
“It truly has been the privilege of my lifetime.”
But after 35 years in politics, including 24 as an MSP and 16 in the Scottish Government, she said it is the “right time” for her to step aside. Her successor will be appointed next week.
Ms Sturgeon told MSPs: “I have made my fair share of mistakes in the last eight years. And, of course, there are things I wish I had done better or differently.
“But overall and overwhelmingly, I am proud of what has been achieved.”
She listed the introduction of the Scottish Child Payment, a benefit which goes to low-income families with children in Scotland, and the minimum unit pricing for alcohol as some of her achievements in Government.
Paying tribute to the Deputy First Minister, who is also stepping down from Government, an emotional Nicola Sturgeon said: “John Swinney (is) the best Deputy First Minister and the best friend I could have wished for on this journey.”
She also emphasised her pride at the Bute House Agreement with the Scottish Greens.
“I am very proud of the Bute House Agreement. Thank you for joining us.”
In a message to her potential successors, Nicola Sturgeon urged the next first minister not to “shy away” from the “big challenges”.
She said: “Next week, we will find out whose portrait will go alongside me on the stairwell of Bute House, subject to this chamber’s approval.
“It will either be Scotland’s second female first minister, or the first from a minority ethnic background.”
She added: “Never forget that everything in this office is an opportunity to make something better for someone somewhere in Scotland.
“Do not shy away from the big challenges that are difficult. You won’t get everything right. But it is always better to try to aim high and fall short than to not try at all.”
Nicola Sturgeon thanked the presiding officer adding that no matter what she does in the future, "nothing will come close to the experience of the past 3,046 days".
She also gave advice to her successor saying that it is always better to aim high and fall short.
Ahead of the speech, Presiding Officer Alison Johnstone paid tribute saying: "On behalf of the parliament I thank the first minister for her service."
She also thanked the deputy first minister, John Swinney for his service for their time in government since 2007.
Emma Roddick, speaking on behalf of the SNP, also paid tribute saying she was 17 when Ms Sturgeon became first minister.
Holyrood's youngest MSP says the outgoing first minister will serve Scotland well as an ambassador "when her successors deliver independence" and praised Nicola Sturgeon for standing up to misogyny, advancing gender equality and leading the country through the pandemic.
She added the SNP leader inspired young girls and will "continue to inspire no matter what she does next".
Opposition leaders also paid tribute to the outgoing First Minister.
Douglas Ross paid tribute saying that he and Ms Sturgeon have been "adversaries rather than allies" and that she has "for better or worse made a mark on the country" adding "We have all lived through the Sturgeon era of politics.
The Scottish Tory leader joked that he is yet to receive £100 from the first minister for a bet about whether she would quit before the next Holyrood election adding that he has asked 256 questions and "once or twice" got an answer at first minister's questions.
Scottish Labour leader Anas Sarwar placed on the record his respect and recognition for Nicola Sturgeon's more than 20 years of public service saying "Nicola Sturgeon is an able and formidable politician" adding that no one could doubt her love for Scotland and that the pandemic will define her time as first minister.
Greens co-leader Patrick Harvie said she had been “resolute” in supporting vulnerable sections of the country. He said: “I have agreed and disagreed with Nicola Sturgeon on issues over the years since then, but in recent months she has shown resolute commitment to stand by another vulnerable groups in our society, while so many in politics and in the media were dredging up the tropes and prejudice of past decades and directing them against transgender people.
“So I can still see today what I remember from those days - Nicola Sturgeon’s commitment to be an ally to marginalised people remains part of her character as a politician.”
Paying particular tribute to the First Minister’s response to the COVID pandemic, Mr Harvie added: “At the start, as we were just coming to terms with what the world was facing, some governments around the world chose bluff and bluster, pretending they knew the answers or offering false simplicity in place of the complex truth.
“Nicola Sturgeon made a braver choice - to be clear about what wasn’t known, and to express the same fears and uncertainty we all felt. Throughout the pandemic, she not only fronted up the Scottish Government response on an almost daily basis, but she did so with honesty, clarity, and humility, and by doing that she earned the public trust.
“Whatever the future brings - I thank both Nicola Sturgeon and John Swinney. I wish them well, and my highest hope is that they continue to infuriate all the right people.”
cottish Liberal Democrat leader Alex Cole-Hamilton said: “The First Minister and I are two very different people, our visions of the future of Scotland and of the United Kingdom just do not align, but I recognise hard work when I see it.
“The sands of Scottish politics are now shifting in big and unpredictable ways – this is a moment, this is a crossroads, a chance to do things differently, and people are now looking for inspiration, they’re looking for new hope.”
In her final words from the frontbench in Holyrood, Ms Sturgeon said she would struggle to say much more “without crying”, as she thanked the opposition leaders for their comments.
“You will of course see me very soon on a backbench near here, but in the meantime, for the final time from me as First Minister, to the people of Scotland: Thank-you from the bottom of my heart for the privilege of being your First Minister.”
The SNP benches then rose in a standing ovation, and Ms Sturgeon then departed the chamber for the final time as First Minister to applause from all parties and the public gallery.
On Friday, Nicola Sturgeon will carry out her last official engagement as First Minister.