He was tipped as the safe pair of hands who might have succeeded Nicola Sturgeon, but on the morning he was set to deliver his fourth budget as finance secretary, Derek Mackay quit in disgrace.
The 42-year-old’s departure from the Scottish Government sent shockwaves through Scottish and UK politics amid claims he sent hundreds of messages to a 16-year-old boy.
An SNP member since his youth, Mackay was first elected to public office as a Renfrewshire councillor in 1999, starting a journey that would see him elevated to the second most powerful job in Scottish politics.
Just 21 when he started his political career, he was at the time the youngest male councillor in Scotland.
Around that time, he took a far more “fundamentalist” view of Scottish independence than he would in his later career, compared to the so-called “gradualists” in the SNP – like Nicola Sturgeon and Alex Salmond – who believed in step-by-step progress towards independence through devolution.
In 2007, he became leader of Renfrewshire Council, at the head of an SNP-Lib Dem coalition, and also won the post of SNP leader on national local government body Cosla.
He remained council leader for four years until he entered the Scottish Parliament in 2011, aged 34, winning the constituency seat of Renfrewshire North and West.
A triumphant SNP under Salmond was enjoying its first and only taste of majority government at Holyrood, and Mackay swiftly won a junior ministerial role, covering the local government and planning brief.
Two years later, the father-of-two came out as gay and revealed he had separated from his wife in an “amicable” split. Mackay later described it as “the most difficult thing” he had ever done.
Over a tumultuous period in Scottish politics which included the independence referendum and the resignation of Alex Salmond, Mackay ultimately ended up promoted to transport secretary in 2015 under new First Minister Nicola Sturgeon.
It had been a tricky brief in the past, and Mackay was severely tested over the closure of the Forth Road Bridge in 2015 after a crack was found, dubbed a “scandal” by political opponents.
At the same time, he was overseeing the construction right alongside the bridge of the new £1.35bn Queensferry Crossing, which opened in 2017.
After surviving transport, in 2016 Mackay moved on to the second biggest job in government, taking over the finance brief from John Swinney with a budget of around £30bn to play with.
He initially also shared the economy and fair work brief with SNP depute leader Keith Brown, until Mackay took over the role completely.
In his time as finance secretary, he has used new powers transferred to Holyrood to remodel the income tax system, including setting a new 19p starter rate for lower earners and making higher rate and top earners pay more than they do in England.
He also took a high-profile role in the rescue of the Dundee Michelin tyre factory, and last year nationalised the Ferguson Marine shipyard in Port Glasgow.
The shipyard had been contracted to build two ferries for operator CalMac before it collapsed, which Mackay revealed in December would cost £100m more than previously understood, which he blamed on “disastrous” former management.
The “fiasco” is currently subject of a Holyrood inquiry.
Mackay had been preparing to unveil his tax and spending plans for 2020-21 later than usual due to Brexit, and was to take the highly unusual step of revealing his budget before the Chancellor unveils the UK Budget.
The then-finance secretary said delaying his budget until mid-March – when UK spending plans will be revealed – would have drastically limited parliamentary scrutiny and caused chaos for local authority budgets, which are bound by law to set their budgets and council tax rates by March 11.
But Thursday’s draft Budget will instead be delivered by public finance minister Kate Forbes after Mackay’s swift resignation this morning.
It was the inevitable outcome of very serious allegations against him made in The Scottish Sun: that he had sent around 270 messages to a teenage boy over a six-month period, including one telling him he was “cute”.
It is not yet clear whether Police Scotland are looking into the claims, but there may yet be more serious political repercussions for Mackay. He has already been suspended from the SNP and its parliamentary group – as announced in the chamber by Nicola Sturgeon – and is facing serious pressure to resign as an MSP.
Such pressure has already been applied by Scottish Conservative leader Jackson Carlaw, who said Mackay’s behaviour could “constitute the grooming of a young individual”, and Scottish Labour leader Richard Leonard, who branded his conduct “abuse of power” and “nothing short of predatory”.