Image copyright Scottish government Image caption Mark McDonald was minister for childcare and early years before he resigned

A former childcare minister who quit after sending an inappropriate text message to a woman will not stand again as an MSP.

Mark McDonald resigned from the SNP in 2018 but continued to sit as an independent representing Aberdeen Donside.

He said he was proud of his achievements but his time in office would be "defined by my mistakes".

SNP leader Nicola Sturgeon previously called on him to resign as an MSP.

Mark McDonald resigned as a minister in November 2017 after it emerged he had sent a text message to a woman referencing a sex act.

The Commissioner for Ethical Standards in Public Life concluded that the case amounted to sexual harassment.

He was suspended from the SNP after "new information" emerged about his conduct and later resigned from the party but resisted calls to stand down as an MSP.

Media playback is unsupported on your device Media caption Mark McDonald explained why he would continue to sit as an independent after resigning from the SNP

As minister for childcare and early years he played a key role in the introduction of the baby box scheme.

In a statement on his Facebook page he said was proud of his achievements both at national and constituency level but conceded these would be overshadowed by subsequent events.

He said: "I am, however, acutely aware that none of these achievements will be the things which people will associate with me, and that my time in office will forever be defined by the mistakes I have made, and for which I have paid a significant and lasting price."

He said he had returned to parliament in order to demonstrate that he had reflected on his conduct and changed.

He added: "I will have to live forever with consequences of those mistakes and the upset that they caused, and it is appropriate for me to reiterate here the apologies I have made before. I continue to seek to make right the things I got wrong."

He said he would continued to serve as an MSP until the next Holyrood election in 2021 when he will step down from parliament.