DEREK Mackay is in line for a £12,000 golden goodbye after resigning over sleazy texts to a 16-year-old schoolboy.

The former Finance Secretary is automatically entitled to a severance payment of £11,945 for losing office, it has emerged.

The sum, which is paid by the Scottish Parliament, is a quarter of his ministerial salary.

He is now being urged to hand it back.

Mr Mackay earned an extra £47,780 a year as a cabinet secretary, on top of his £63,579 basic salary as the MSP for Renfrewshire North and West.

Although he has lost his ministerial pay bump, he continues to receive his MSP salary.

Scottish Conservative chief whip Maurice Golden said: “Given the circumstances in which Mr Mackay left the role, it’s clearly inappropriate for him to profit in any way.

“The pay-off should be rejected or, at the very least, passed on to a charitable cause.

“Anything else would do serious damage to Scottish politics as a whole.”

A Scottish Liberal Democrat spokesperson said: “These are troubling and alarming events. Derek Mackay should step down as an MSP and refuse any ministerial payoff.”

A Scottish Parliament spokesperson said: “Legislation states that after a 90 day period, the equivalent of three months’ salary is payable on ceasing to hold a Ministerial position.

“The Scottish Parliamentary Corporate Body has no discretion in relation to the making of payments.

"The legislation says the SPCB must pay the grant after 90 days.

“It is a matter for the Member thereafter.”