He had been tipped as a possible successor to Nicola Sturgeon, but now Derek Mackay has been forced to quit the Scottish Government.
The 42-year-old stepped down as Scottish Finance Secretary just hours before he was due to unveil his Budget for 2020-21, after a newspaper reported he had sent hundreds of messages to a 16-year-old boy.
It comes more than two decades after he began his career in politics, being elected as a councillor in Renfrewshire in 1999.
It made him the youngest male councillor in Scotland, having been elected at just 21.
Mackay went on to become leader of the council's SNP group and took them into power in the area for the first time in 2007 – at which point he became leader of the council.
WATCH: Nicola Sturgeon's statement to Holyrood on Derek Mackay
He used his role to build a national profile within local politics, becoming the SNP group leader at Cosla – the organisation which represents Scotland's local authorities.
In 2011 he was elected to Holyrood as MSP for Renfrewshire North and West.
That same year he joined the Scottish Government, becoming minister for local government and planning.
A reshuffle after Nicola Sturgeon became First Minister in 2014 saw him appointed transport minister.
He was further promoted to the Cabinet after the 2016 Scottish election, taking the job of Finance and Economy Secretary.
He was previously married and has two children, but in 2013 he came out as gay. He later described that as the "most difficult thing I've ever had to deal with".
READ MORE: No criminal complaints filed against Derek Mackay, Police Scotland say
During his time as finance secretary, he was responsible for introducing new Scottish income tax rates, including a new "starter rate" set at 19p for lower earners.
Why are you making commenting on The National only available to subscribers?
We know there are thousands of National readers who want to debate, argue and go back and forth in the comments section of our stories. We’ve got the most informed readers in Scotland, asking each other the big questions about the future of our country.
Unfortunately, though, these important debates are being spoiled by a vocal minority of trolls who aren’t really interested in the issues, try to derail the conversations, register under fake names, and post vile abuse.
So that’s why we’ve decided to make the ability to comment only available to our paying subscribers. That way, all the trolls who post abuse on our website will have to pay if they want to join the debate – and risk a permanent ban from the account that they subscribe with.
The conversation will go back to what it should be about – people who care passionately about the issues, but disagree constructively on what we should do about them. Let’s get that debate started!
Callum Baird, Editor of The National
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article