Scotland's finance chief has resigned after a newspaper report that he had sent hundreds of messages to a 16-year-old boy.
Scottish Finance Secretary Derek Mackay, 42, apologized for what he said was foolish behavior.
"I have behaved foolishly and I am truly sorry," Scottish Finance Secretary Derek Mackay said in a statement. "I apologize unreservedly to the individual involved and his family."
"Serving in government has been a huge privilege and I am sorry to have let colleagues and supporters down," he added.
The Sun newspaper reported that Mackay, seen as a potential leader of Scotland, had sent about 270 messages to the boy on Instagram over a six-month period, telling the boy that he was "cute" and inviting him to dinner.
Mackay had been due to deliver the Scottish government's annual budget on Thursday, when the report came out on the front page of the Sun's Scottish edition.
He said that he spoke to Scotland's first minister, Nicola Sturgeon, and resigned last night.
Sturgeon said that Mackay's behavior "failed to meet the standards required" and that the public finance minister will deliver Scotland's budget instead.