THE SNP’s Westminster frontbencher Joanna Cherry was among the first to give a public response to Finance Secretary Derek Mackay’s resignation yesterday.

The MP for Edinburgh South West and the party’s justice and home affairs spokesperson at Westminster condemned his behaviour as “totally unacceptable”.

She said Nicola Sturgeon was right to accept Mackay’s resignation as Finance Secretary yesterday and suspend him from the SNP.

Mackay, 42, bombarded a 16-year-old schoolboy with persistent online messages, including one calling him “really cute”. They continued even after the boy revealed he was still in school, and then later said he was 16.

Writing on Twitter Cherry, a senior lawyer and QC, said: “Grooming behaviour is totally unacceptable & must be condemned without fear or favour. The First Minister was right to accept Derek Mackay’s resignation & suspend him. The party’s disciplinary procedures must now take their course.”

Hannah Bardell, the Livingston MP who is the party’s spokesperson on consular affairs and international engagement, also gave her view on Twitter and praised the First Minister’s handling of the situation which has sent shock waves through the party.

She wrote: “Nicola has shown strong leadership today and the right thing has been done.

“Positions of power come with huge responsibility. My thoughts are with the young lad and his mum. I hope others think of them too, before posting & commenting.”

READ MORE: Renfrewshire locals say Derek Mackay has lost their votes

READ MORE: Derek Mackay resigns as Finance Secretary over texting scandal

Other senior figures in the party did not want to be quoted by name.

One parliamentarian told The National: “Everyone is just stunned. We are in a state of shock. Nobody saw this coming.”

A second insider said: “People are angry and sad too for Derek, who was very well liked and a very able politician.

“But there is also a feeling of nervousness and malaise. There is a sense of worry about what could happen and a lot of talk about the need to get on top of things on the domestic front as we head into the Holyrood election in May next year.”

And while opposition parties called for Mackay to stand down as an MSP, there was sympathy too among rival politicians.

Murdo Fraser, the Scottish Tories' finance spokesperson, gave his immediate reaction on Twitter – and later modified his response.

He wrote: “Derek MacKay acted foolishly and is right to resign from the Govt. Politics aside, I have always enjoyed working with him, and he is popular in his own Party and across the Parliament. I wish him and his family well in what will be a difficult time.”

Fraser then later added: “I have had quite a bit of abuse for this tweet from earlier. Just to be clear: what MacKay did was inappropriate, wrong & could amount to grooming of a teenager. He should resign as a MSP. But we should hate the sin, not the sinner. We shouldn’t hate him, or his family.”