SCOTLAND'S former finance secretary has resigned from the SNP more than a year after he was suspended from the party over messages he sent to a teenage boy.

Derek Mackay resigned as finance secretary hours before he was due to deliver the Scottish budget on February 6 2020, following reports he sent hundreds of messages to a 16-year-old boy on social media.

The Scottish Sun reported Mackay befriended the teenager on Facebook and Instagram and sent him 270 messages.

The Renfrewshire North and West MSP was suspended from the SNP pending further investigation, but continued to sit as an independent.

READ MORE: Former BBC chief on why we must move ‘real power’ outside of London

He told the party he is resigning to “focus on the recovery of my mental health and serving my constituents”.

An SNP spokesman said: “Derek Mackay has resigned his membership of the SNP, bringing the matter to a close.

“As was widely reported last year, Mr Mackay was receiving mental health support, and as a result disciplinary action was paused.

“We wish him well for his recovery.”

READ MORE: How SNP insiders reacted to a turbulent week for the party

Mackay wrote to the SNP national secretary earlier this week to inform the party of his decision.

In the letter he wrote: “I write to confirm I am not seeking SNP membership and continue to focus on the recovery of my mental health and serving my constituents.”

Announcing his resignation on budget day last year, Mackay admitted he had “behaved foolishly” and apologised “unreservedly” to the individual involved and his family.

Police Scotland carried out an investigation into the messages Mackay sent to the teenager and concluded no crime was committed.