The Scottish Government spent more than £250,000 on the Supreme Court case on its indyref2 legislation, it has been revealed.
Figures released by the Government show £251,728.69 was spent on the case, which concluded in November.
The panel of five justices ruled the Scottish Parliament does not have the power to legislate for an independence referendum without Westminster’s permission.
The Scottish Government referred its proposed legislation on a second independence referendum to the court, asking for a ruling on its legal competence.
A two-day hearing took place in London in October, where the Scottish Government was represented by its top law officer, Lord Advocate Dorothy Bain KC.
The bulk of the costs in the case went on external counsel: £222,869.45.
Travel and subsistence for the case cost £19,711.25, while £8,049.99 was spent on “professional services”.
Filing fees for the Supreme Court were £350 and other costs for the court were £748.
Commenting on the figures, Scottish Liberal Democrat leader Alex Cole-Hamilton said the government should end its work on the independence prospectus papers.
He said: “Having faced a humiliating defeat in the Supreme Court, we now learn that the Scottish Government threw away over a quarter of a million in taxpayer money on this farce.
“Scottish Liberal Democrats are calling on the SNP to refund every penny of that money and for all the civil servants working on yet more separation papers to be immediately redeployed.
“Households feeling the weight of the cost of living and patients suffering in pain as they wait for treatment will be absolutely baffled by this gross waste of public money.”
Scottish Conservative constitution spokesman Donald Cameron said: “Taxpayers will be appalled that this significant sum of their money has been frittered away by the SNP.
“The fact legal experts said they were destined to lose makes it all the worse.
“It is a disgraceful waste of public money at a time when Scots are grappling with the cost-of-living crisis and our NHS is totally overwhelmed.”
During the budget last week, deputy first minister John Swinney announced £20m earmarked for a second referendum next year would instead go towards tackling fuel poverty.
A Scottish Government spokeswoman said: “As the First Minister has previously set out, there has long been debate over whether the Scottish Parliament has the powers to legislate to hold a referendum.
“The Lord Advocate’s reference of this question to the Supreme Court was intended to achieve legal clarity on this point, which it has done so.
“In light of majority support within the Scottish Parliament for an independence referendum, Scottish ministers remain ready to engage with the UK Government at any point on delivering a referendum.
“In line with its Programme for Government commitments, the Scottish Government will continue to publish its Building a New Scotland prospectus series.”
The SNP’s depute leader, Keith Brown, said: “The only reason this case was necessary was because of the democracy-denying antics of the Tory Government at Westminster, egged on by their Labour and Lib Dem cheerleaders.
“The Westminster parties’ bid to block Scottish democracy is utterly unsustainable and will not prevail.”