Derek Mackay has resigned as the Scottish finance secretary with immediate effect following allegations he sent inappropriate messages to a teenage boy.

The 42-year-old is alleged to have called the schoolboy ‘cute’ in one of around 270 private messages sent between the pair over Facebook and Instagram during a six-month exchange.

It comes just hours before he was due to set out the Government’s £43 billion spending plans at Holyrood.

READ MORE: Scottish finance chief Derek Mackay accused of sending 'inappropriate' messages to teenage boy

The Scottish Sun reported Mackay began messaging the boy last August and continued despite being informed he was only 16.

The boy's mother called on First Minister Nicola Sturgeon to sack Mr Mackay and launch a full investigation.

However, in a statement issued on Thursday morning, Mr Mackay said he took "full responsibility" for his actions and stood down.

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."

He added: "Serving in government has been a huge privilege and I am sorry to have let colleagues and supporters down."

Mr Mackay is said to have asked “Are our chats between us?” before telling the teen: “I think you are really cute.”

He is also alleged to have asked the youngster to help him deliver campaign leaflets and offered to let him ‘stay for dinner’ afterwards.

Public finance minister Kate Forbes is now expected to deliver the budget later on Thursday.

Accepting Mr Mackay’s resignation, the First Minister 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."

READ MORE: Call for social care investment after rise in delayed discharges

"He has submitted his resignation as a government minister which I have accepted."

She added: “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.”

MORE TO FOLLOW.