The Scottish Government spent more than £22,000 consulting on a possible second independence referendum before the plans were shelved by Nicola Sturgeon.

Labour and the Conservatives branded the total, which was released under Freedom of Information, as "outrageous" and "shocking", with Tory MSP Maurice Golden insisting no more public cash should be spent on the "nationalists' toxic obsession with wrenching Scotland out of the United Kingdom".

They made the criticisms after it was revealed the overall cost incurred by the Scottish Government in preparing, running and analysing the consultation on the draft referendum bill amounted to £22,593.19.

The First Minister announced the consultation would be carried out following the UK vote for Brexit, insisting at the time she had to "protect Scotland's interests" after 62% of voters north of the border opted to stay in the European Union (EU).

Following the result of the snap general election, in which the SNP saw its share of the vote drop from 50% in 2015 to 37%, she said she would "reflect" on the next steps.

The SNP leader confirmed at the end of June that plans for a second referendum were being put on hold, stating ministers would not introduce legislation "immediately" but would consider the issue again at the end of the Brexit process

The bulk of the cash - more than £16,000 - was spent on analysing responses to the consultation, according to the Government's figures.

It made clear the work that had been done was "carried out by existing members of staff as part of their normal duties".

A Scottish Government spokesman said: "This consultation is vitally important in ensuring the technical procedures around any future referendum are robust, fair and transparent.

"While the First Minister has made clear that the Scottish Government will not seek to introduce the legislation for an independence referendum at this stage, it is crucial that all options should be available to the Scottish Parliament at the conclusion of the Brexit negotiation period.

"The costs of the consultation are comparable with other consultations of this size."

Mr Golden, the Scottish Conservative chief whip, said: "It is absolutely shocking that tens of thousands of pounds of taxpayers' money has been wasted pursuing the SNP's plans for a second referendum.

"The SNP needs to listen to the many responses in the consultation that state no further public money should be thrown into the nationalists' toxic obsession with wrenching Scotland out of the United Kingdom.

"We voted No to independence in 2014 and it's high time the SNP stopped ignoring the wishes of Scotland."

Scottish Labour economy spokeswoman Jackie Baillie added: "It is outrageous that the SNP has spent more than £22,000 of taxpayers' money laying the groundwork for a divisive second independence referendum nobody wants.

"The people of Scotland have killed Nicola Sturgeon's independence dream - but she's just not listening.

"Instead of governing, she has spent a decade trying to plot the break-up of the UK - and Scotland's NHS, schools and economy have paid the price.

"The SNP needs to stop billing taxpayers for its independence fantasy and get back to the day job of fixing the mess it has made of our public services."