Humza Yousaf said "it was the greatest privilege of my life" to have led his country as he announced his resignation as First Minister at Bute House.

Facing two confidence votes, one on his premiership and one on his government, the SNP leader stood down after it became clear he had no path to success.

Here's what he had to say in full.

"Last week I stood here to announce the ending of the co-operation agreement between the SNP and the Greens, the Bute House agreement, and that the SNP would seek to govern as a minority government.

"I made that decision as leader of the SNP because I believed ending the Bute House Agreement was the right one for the party I lead, and I still do believe that to be the case.

"But, most importantly, I believe it was the right decision for the country.

"My hope was to continue working with the Greens in a less formal arrangement as the SNP moved into a new phase of minority government.

"Unfortunately in ending the Bute House Agreement in the manner I did, I clearly underestimated the hurt and upset that caused for Green colleagues.

"For a government, let alone a minority government, trust and working with the opposition is clearly fundamental.

"While a route through this week's vote of no confidence was possible, I am not willing to trade my values and principles or do deals with whomever simply for retaining power.

"After spending the weekend reflecting on what's best for my party and the country I lead, I've concluded that repairing our relationship across the divide can only be done with someone else at the helm.

"I have therefore informed the SNP's national secretary of my intention to stand down as party leader and ask that she commences a leadership contest for my replacement as soon as possible.

The Herald: Humza Yousaf announces his resignationHumza Yousaf announces his resignation (Image: Jeff J Mitchell/PA Wire)

"In order to ensure a smooth and orderly transition, it is my intention to continue as First Minister until my successor has been elected, particularly as parliament will be debating some incredibly important legislation in the coming days and the coming weeks.

"I cannot tell you what an honour it is being the First Minister of the country I love, the country I'm raising my family in, and the only country I'll ever call home.

"As a young boy born and raised in Scotland, I could never have dreamt that one day I would have the privilege of leading my country.

"People who looked like me were not elected to positions of political influence, let alone leading governments, when I was younger.

"But we now live in a UK that has a British-Hindu Prime Minister, a Muslim mayor of London, a black Welsh First Minister and - for a little while longer - a Scots-Asian First Minister of this country.

"So for those who decry that multi-culturalism has failed across the UK, I would suggest that the evidence is quite to the contrary - and that is something we should all celebrate.

Read More:

"I've had the honour of serving in government for almost 12 years in a variety of roles, whatever position I've held during my time in politics I've always been guided by my values.

"As First Minister I am incredibly proud to have a fair tax system, the most progressive in the UK, where those who earn the most contribute the most.

"And it will always be my core belief that in a country as rich as ours wealth must be far more evenly distributed.

"I've no doubt at all that whoever takes over from me will be just as committed to reduce child poverty. I'm proud that, through our actions, an estimated 100,000 children are expected to be lifted out of poverty this year.

"I also hope that, as a country, we can be really proud of the strides that we have made to tackle inequality, prejudice and discrimination.

"But let's also acknowledge that, far too often in our country, hatred continues to rear its ugly head.

"In a world where every issue seems to descend into a toxic culture war it's often the most marginalised in our society who bear the brunt.

"AS politicians of all political parties we're afforded and are privileged to have a platform, and all of us must resist the temptation of populism at the expense of minorities, particularly in a general election year.

The Herald: Photos of First Ministers of Scotland on a wall in Bute House, the official residence in EdinburghPhotos of First Ministers of Scotland on a wall in Bute House, the official residence in Edinburgh (Image: Andrew Milligan/PA Wire)

"I've often said that as a minority myself, my rights don't exist in a vacuum and are only protected because the rights of everyone are protected.

"From the backbenches of the Scottish Parliament I will continue to champion the voices and the rights of those who are not often heard, be that at home or indeed overseas such as those who are suffering and continue to suffer the most catastrophic humanitarian situation in Gaza as the world watches on.

"Let me say to my SNP family: I will always be with you. I will always campaign alongside you.

"We have had setbacks in our movement but we have overcome them and we will do so again.

"Independence feels frustratingly close and, believe me, no-one feels that frustration more than the leader of the SNP. But the last few miles of the marathon are always the hardest, we have run this marathon as a team and I will now prepare to pass the baton to a successor who I'm absolutely certain will lead us over the finish line.

"And I will tell you today what I will say to that successor: First Ministers get to meet countless inspirational people in communities across Scotland working to improve the lives of people around them. First Ministers get to see first hand many of the exciting businesses and industries that will power Scotland's future. And whenever First Ministers set foot beyond Scotland's shores, no matter where they go in Europe or across the world, they encounter friends and admirers of our nation.

"If only every person in Scotland could  be afforded the opportunity to be First Minister for just. One. Day. On the very next day it's my belief that they would vote for independence with both their head and their heart.

"To my fellow MSPs of all political persuasions: next week is a crucial milestone, we mark 25 years of devolution.

"We have a electoral system which is designed for no political party to have an absolute majority.

"Devolution's mothers and fathers, rightly in their wisdom, believed that no-one loses out by politicians sharing wisdom, sharing counsel, sharing ideas.

"The reverse is also true, and that is why I would make an appeal to colleagues from across the political spectrum that while government must of course act in good faith, so must their opposition, and be prepared to collaborate with us rather than just oppose for opposition's sake.

"The only people who suffer as the result of such an impasse are the very people we seek to serve.

"Politics and politicians - not unreasonably, I'm afraid - have often been maligned, however I believe that when we get it right - and often we do - we are a force for good that can transform people's lives for the better.

"To my colleagues in opposition, regardless of political party, I genuinely do wish you well. I bear no ill-will and certainly no grudge against anyone.

"Politics can be a brutal business, it takes its toll on your physical and mental health, your family suffer alongside you.

"I am in absolute debt to my wonderful wife, my beautiful children, and my wider family for putting up with me over the years - I'm afraid you'll be seeing a lot more of me.

"You are truly everything to me and, although of course as you can tell I'm sad that my time as First Minister is ending, I am so grateful and so blessed for having the opportunity that is afforded to so few: to lead my country. And who could ask for a better country to lead than Scotland?

"Thank you very much."