Nicola Sturgeon has been accused of a failure of leadership over the Derek Mackay scandal, as it emerged the Scottish Government demanded to know the “justification for publication” of a story which exposed him and the name of the 16-year-old he is accused of sending hundreds of messages too.

Scotland’s Deputy First Minister John Swinney, who said he was “utterly stunned” by the revelations, insisted the Government had “simply asked for information to give us the veracity and the substance of the points that were being put to us”.

He told BBC Radio Scotland that when he was informed the story was going to be published, it was “the first time that I had heard any revelations of this type”.

READ MORE: Nicola Sturgeon 'banned shamed Derek Mackay from drinking at SNP conferences'

Mr Mackay, the MSP for Renfrewshire North and West, quit as finance secretary on Thursday morning, just hours before he had been due to deliver the Scottish Budget to Holyrood.

His resignation came after The Scottish Sun reported he had sent 270 messages to a 16-year-old boy he befriended on Facebook and Instagram.

Mr Mackay – who has now also been suspended from the SNP pending investigation – is reported to have called the youngster “cute” as well as offering to take him to a rugby game and out to dinner.

Oppositions politicians hit out at the “predatory” behaviour from the politician – who had been tipped as a future successor to Ms Sturgeon.

Interim Scottish Conservative leader Jackson Carlaw claimed there had been “collective failure of leadership” from the First Minister and SNP business convener Kirsten Oswald after the story emerged.

On Friday, a report in the Daily Record said SNP activist Shaun Cameron, 25, had been sent dozens of unwanted messages by Mr Mackay over a period of four years.

He claimed the MSP contacted him on Facebook after meeting him at an SNP event when he was 21, and said some of the messages were “quite suggestive” – alleging the then finance secretary had asked him in September 2017: “Got any naughty pics?”

Mr Carlaw said: “Nicola Sturgeon, when asked yesterday in the Scottish Parliament if she had sought assurances from Derek Mackay that the story reported was an isolated incident, replied merely that she was unaware of any other potential victims.

“It is now clear that no such assurances were sought from Mr Mackay by the First Minister, given there are other people coming forward.

“From the start, it seems the SNP Government has been more interested in protecting its own reputation than in the welfare of potential and actual victims.”

He said the Scottish Government and the SNP “should have already established a confidential hotline for potential victims to contact to report concerns and to receive appropriate support”.

He said Ms Sturgeon and Ms Oswald “both now need to respond and act with far greater urgency and understanding”.

Mr Mackay, who came out as gay in 2013, accepted in his resignation statement that he had “behaved foolishly”, as he apologised unreservedly to the teenage boy and his family.

He said: “I take full responsibility for my actions. I have behaved foolishly and I am truly sorry.”

READ MORE: Former finance secretary faces fresh allegations over unwanted messages

Speaking at Holyrood on Thursday, Ms Sturgeon said: “Derek Mackay has apologised unreservedly for his conduct and recognised, as I do, that it was unacceptable and falls seriously below the standard required of a minister.”

An SNP spokesman said: “Derek Mackay has been suspended from both the parliamentary group and the party while further investigation takes place.

“In the interests of due process, no further comment will be made.”