Scotland’s Finance Secretary Derek Mackay has resigned amid allegations he sent hundreds of messages to a 16-year-old boy.
The Scottish Sun reported that Mr Mackay, 42, befriended the teenager on Facebook and Instagram and sent him 270 social media messages.
On Thursday morning, Mr Mackay announced his resignation, saying he had “behaved foolishly”.
In a statement, he said: “I take full responsibility for my actions. I have behaved foolishly and I am truly sorry.
“I apologise unreservedly to the individual involved and his family.
“I spoke last night with the First Minister and tendered my resignation with immediate effect.
“Serving in government has been a huge privilege and I am sorry to have let colleagues and supporters down.”
SNP leader and First Minister Nicola Sturgeon said Mr Mackay had “failed to meet the standards required” from him.
Mr Mackay, who was tipped by some to be a future First Minister, had been due to unveil the Scottish Government’s Budget for the next financial year on Tuesday.
This will now be presented by public finance minister Kate Forbes.
Mr Mackay has been a member of the Scottish Parliament since 2011.
He was previously a cabinet secretary and had been a minister for local government and planning.
The Sun published a long string of messages allegedly sent to the boy by the Renfrewshire North and West MSP.
In one message, he is alleged to have asked “And our chats are between us?”
When the boy agreed he allegedly told him: “Cool, then to be honest I think you are really cute.”
The newspaper alleges he contacted the teenager over a six-month period, and offered to take him to a rugby game and out to dinner.
In one of the messages the boy tells Mr Mackay he is 16.
The teenager’s mother previously called on First Minister Nicola Sturgeon to act to deal with Mr Mackay “very seriously”.
Accepting Mr Mackay’s resignation, First Minister Nicola Sturgeon said: “Derek has taken full responsibility for his actions and apologises unreservedly for them to the individual involved and to those he has let down. He has submitted his resignation as a government minister which I have accepted.
“Derek has made a significant contribution to government, however he recognises that his behaviour has failed to meet the standards required.
“The Minister for Public Finance, Kate Forbes, will present today’s Scottish Government budget setting out our actions to support the economy, back our people and public services and tackle the climate crisis, and that remains my government’s focus.”
Mr Mackay’s resignation 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.
Mr 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.