In total, the UK Government spent £85,646 on external legal costs around the United Nations Convention on the Rights of the Child (UNCRC) and local government charter bills passed unanimously by the Scottish Parliament in the last session.
The Scottish Government spent £97,850 – more than £12,000 more than the UK Government – to defend its position and the legislative competence of the bills.
Judges at the Supreme Court ruled the Bill, which sought to incorporate the United Nations Convention on the Rights of the Child into Scots law, went beyond the powers available to the Scottish Parliament.
The UK Government referred it to the Supreme Court due to the concerns around whether it was competent legislation for Holyrood to pass.
In the ruling, Lord Reed said the Bill had been drafted in a way that went beyond the competency of Holyrood and would undermine the Scotland Act.
This was criticised by Deputy First Minister John Swinney, who said it put Scotland in a “ludicrous constitutional position”.
Freedom of Information responses to The Scotsman show the total cost of the court action to the taxpayer is at least £183,496, with more un-costed internal resource also likely allocated to deal with the dispute.
A UK Government source defended its decision to take the Scottish Government to court over the Bill, saying SNP ministers had been warned the legislation was outside the competence of Holyrood.
The source said: “Our concerns with the Bill had nothing to do with its policy objectives. Rather, they were down to the fact that it would affect the UK Parliament’s ability to legislate in Scotland by placing legal obligations on UK ministers in reserved areas.
“Unfortunately our warnings and suggestions for changes were ignored. Therefore the relevant sections of the Bill were referred to the Supreme Court, which agreed with our view on every count."
The source also accused the SNP of “playing politics” with the Bill ahead of the Holyrood election in May, adding: “This has wasted time and money and resulted in the delay of important legislation.”
During the Holyrood election, SNP ministers used the case to claim Conservative politicians were blocking additional protections for children.
Scottish Green human rights spokesperson Maggie Chapman said the £85,000 UK spend was “appalling”.
She said: “It’s appalling to see that Boris Johnson’s Government spent tens of thousands of pounds of public money to deny Scotland’s children those rights and the figures quoted don’t even include the department’s own internal expenditure, so the cost will likely be considerably higher.
"It is an ongoing frustration that the devolution settlement can be overridden at the whim of a Tory government at Westminster, but apparently isn’t flexible enough to allow us to incorporate the rights of children into law.”
A spokesperson for the the Scotland Office said: “It was important to seek legal clarity from the UK Supreme Court as it is vital that all legislation clearly reflects the competence and roles of Scotland’s two parliaments and governments."
The Scottish Government and the SNP were contacted for comment.