Scottish finance secretary Derek MacKay has resigned after he was exposed for sending over 260 messages to a boy he knew to be only 16-years-old.

Only hours before delivering the Scottish budget, The Scottish Sun published details of MacKay’s messages which began in August when the Scottish National Party politician privately contacted the boy on social media.

MacKay, who was expected to eventually replace First Minister Nicola Sturgeon, called the boy “really cute” in one message, offered him dinner in another, asked if the boy wanted to join the him at a rugby function, and liked photos of the boy in his rugby gear.

Mr. MacKay, who has two children, had announced he was gay after leaving his wife in 2013 and now lives with his boyfriend. He sent messages to the 16-year-old for the past six months, including on Christmas Day, with the boy making his age clear on numerous occasions and also warning the politician “not to try anything.”

MacKay is said to have revealed his sexuality to the boy on September 8, but the boy claims the message was then deleted by the 42-year-old.

Scottish Conservative leader said the behaviour could “constitute the grooming of a young individual”, and called on MacKay to also step down from the Scottish Parliament, whilst Scottish Labour leader Richard Leonard said MacKay’s actions were “an abuse of power” and “nothing short of predatory”.

The boy’s mother told the Scottish Sun she worries “about what would have happened if my son had sent him back a message he wanted to hear.”

“You can see he tries again and again — like he is trying to get my son to change his mind about something. He is trying to see how much he can push it.”

MacKay released a statement this morning expressing his regret: “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.”

Nicola Sturgeon labelled his behaviour “unacceptable”, saying she did not learn of the behaviour until yesterday and that she is not aware of any other allegations against him.