Deputy First Minister John Swinney repeatedly tried to leave the Scottish Government over the past seven years but Nicola Sturgeon “wouldn’t countenance” his departure.
Mr Swinney said he approached the SNP leader with an offer to step down in 2016 and again in 2021 but was asked to stay.
The Perthshire MSP also revealed he came “incredibly close” to quitting around the time he faced a confidence at the Scottish Parliament over the exam results row during the pandemic.
Mr Swinney, then the education secretary, approved a system that resulted in some pupils being downgraded based on the historic performance of their school.
It appeared to disadvantage pupils from more deprived areas and was scrapped following significant controversy.
Students later received grades recommended by their teachers.
Protected while MSPs tried to oust him
The confidence vote in Mr Swinney gave MSPs the opportunity to oust him from his government role.
It was only the fourth time in the history of devolution that politicians at Holyrood had resorted to the mechanism to try and remove a government minister.
The next occasion came a year later when MSPs tried to force him out as deputy first minster over lengthy delays to the publication of legal advice relating to Alex Salmond’s judicial review against the Scottish Government.
Mr Swinney revealed his attempts to quit while appearing on the BBC’s Nicola Sturgeon podcast, due to be published soon.
That’s your mistake mate, you should own it.
Speaking about the exams controversy, he said: “I persuaded the first minister that was the right thing to do, and it turned out to be the wrong thing to do.
“I came incredibly close to resigning.
“Very, very close because I felt I had made a mistake.
“l remember reading a comment which said surely the kids in Scotland could have been given a break because everything else has been turned upside down.
“And I thought, that’s your mistake mate, you should own it.”
Mr Swinney said he took “a bit of persuading” but Ms Sturgeon convinced him to stay as education secretary to make changes to the system.
He later survived the no confidence vote.
Both Mr Swinney and Ms Sturgeon are stepping down.
When he knew Sturgeon might leave
The deputy first minister said he began to wonder around Christmas if Ms Sturgeon was planning to resign when she did not challenge his own plans to quit.
He said on previous occasions, following Scottish Parliament elections in 2016 and 2016, the first minister “basically wouldn’t countenance me leaving government”.
Ms Sturgeon agreed that whenever her deputy had previously raised the possibility of leaving, she did “everything in my power to talk him out of it”.
But when Mr Swinney discussed his plans to go at the end of last year, she felt “maybe in my response to John there was a sense of what deep down inside maybe I knew was coming for me as well”.
Ms Sturgeon described Mr Swinney as “the most important person in my adult life outside my husband and family”.
In a personal statement at Holyrood on Thursday, she described him as “the best deputy first minister and the best friend” she could have had in office.
Conversation