'Scotland's finance secretary has quit hours before delivering his budget amid reports that he messaged a 16-year-old boy on social media.
The Scottish Sun said that Derek Mackay contacted the boy over a six-month period, and told him that he was "cute".
Mr Mackay said he had "behaved foolishly" and took full responsibility for his actions.
And he apologised "unreservedly" to the boy and his family.
First Minister Nicola Sturgeon said she had accepted Mr Mackay's resignation, adding: "Derek has made a significant contribution to government, however he recognises that his behaviour has failed to meet the standards required."
Scottish Conservative leader Jackson Carlaw called on Mr Mackay to also stand down from the Scottish Parliament, saying his behaviour could "constitute the grooming of a young individual".
The newspaper detailed allegations that the 42-year-old politician contacted the boy "out of the blue" in August of last year and sent about 270 messages on Instagram and through Facebook.
It has published a list of messages - the most recent of which is from earlier this week - involving Mr Mackay and the boy, in which its says the SNP MSP invited him to dinner and to attend a rugby event.
The newspaper also reported that Mr Mackay contacted the boy several times on Christmas Day, and told him on another occasion that he was "looking good with that new haircut".
In one of the exchanges, Mr Mackay is said to have told the teenager he was "cute". In another the boy confirmed he was 16 and tells Mr Mackay "not to try anything".'
Read more: Derek Mackay: Scottish finance secretary quits over messages to boy
Did you like this article?
Thank you for your vote!
46 minutes ago
Westminster abuse claims: Police and parties 'turned blind eye' - just as I said at the time, but it was just a 'conspiracy theory', right?
21 January 2020
Jimmy Savile, Bill Clinton, Jeffrey Epstein And Prince Andrew Exposed By Former BBC Journalist
14 January 2020
Isle of Wight Police Corruption and Paedophilia Investigation Cover-Up Claimed By Former Officer
From our advertisers
21 hours ago
‘We should talk war crimes & killing civilians, not US espionage claims in this court’ – WikiLeaks head Kristinn Hrafnsson
From our advertisers