JUST how desperately cynical is the UK Government’s legal position? Let me count the ways. Represented before the Supreme Court by the Advocate General for Scotland, the UK Government’s attack on Holyrood’s Brexit Continuity Bill was full-frontal.

This was the first time in the history of devolution that the UK Government has actively tried to spike Holyrood legislation – but the novelty of the experience did nothing to dampen Baron Keen of Elie’s savage enthusiasm for the subordinate status of Scottish institutions.

The legislation was intended to give Scottish ministers some say about how we cleared up the mess of Brexit in devolved areas. After all, why should we trust Michael Gove to deal with matters which fall squarely within Holyrood’s responsibilities? Why defer to Whitehall if – as a matter of law – you really don’t have to? The overwhelming majority of MSPs backed the Scottish Government’s proposals in the spring on a cross-party basis.

READ MORE: Supreme Court rules Holyrood was entitled to pass Continuity Bill

Holyrood is built on a reserved powers model. This means that unless a responsibility is explicitly reserved to Westminster, it is devolved. Scrabble around in Schedule 5 of the Scotland Act – which lists these reserved matters – and you won’t find many of the key themes of EU law mentioned. Instead, Section 29 of the Scotland Act binds Holyrood over to act in compliance with EU rules in passing Bills and making laws.

Whitehall realised – belatedly, but with some alarm – that if the UK leaves the EU, this would automatically empower the Scottish Parliament to flex its legislative muscles in fields historically regulated by EU law, including fisheries, farming and the environment. St Andrews House saw this too. The Tory response was legally and politically hysterical.

As the Brexit Continuity Bill passed through Holyrood, the Scottish Tory benches choired their harrumphs. Grubbing around for any pretext to reject the Bill, Conservative MSPs argued the legislation was self-evidently “bad law” and “unlawful”. Adam Tomkins even claimed the SNP were “inviting Holyrood to rush through illegal constitutional legislation”.

Yesterday, the Supreme Court nuked the Scottish Tory position. Seven judges held the constitutional law professor got his constitutional law wrong.

But Tomkins’s colleagues threw everything at it to make his charges stick in court. The Scottish Bill related to reserved matters, Baron Keen argued. It interfered with Westminster’s prerogatives, he said. It broke with EU law. It even defied the rule of law. This was a classic “blunderbuss” case, where any and every kind of legal ammunition was loaded into the legal submissions, in the hope that one stray bullet finds its mark.

Privately, UK Government lawyers recognised that great swathes of their legal argument were remarkably weak. That weakness was exposed in Thursday morning’s judgment. On almost every substantive point, the Supreme Court found against the UK Government’s law officers.

READ MORE: Downing Street: No Brexit vote until new year

Lady Hale and her six colleagues held that the Scottish Bill did not relate to reserved matters. It didn’t defy EU law. It didn’t offend against the rule of law. When MSPs passed the Bill, they were perfectly within their rights to do so, despite the Tory noises off. The court also determined that one section of the Scottish Bill clashed with the devolution settlement – but only one. Across the piece, it was a substantive vindication of the Lord Advocate’s position.

But that wasn’t the end of the story. Lord Keen had one last cynical argument up his pinstriped sleeve. When Holyrood passed its Brexit Bill, Theresa May’s government referred the Bill to the Supreme Court. This meant royal assent couldn’t be granted to the Scottish Bill until the controversy about its legality was resolved. During this dead time, Westminster sneaked out its own Brexit Withdrawal Bill, which the Queen signed tout suite. Despite Holyrood’s objections, this UK legislation amended the Scotland Act. And what it said was that Holyrood didn’t have the power to amend the European Union (Withdrawal) Act 2018.

But where did this leave Holyrood’s Brexit Bill – caught in legal limbo – passed months earlier by MSPs, but not yet in force? From a legal perspective, which was the important date? Was it (a) the day MSPs passed a Bill, or (b) the legislative competence of the Parliament when royal assent is granted?

The UK Supreme Court decided yesterday that (b) is the right answer. In the process, they determined that London had – essentially – exercised a pocket veto over perfectly lawful Scottish legislation. They’ve changed the legal goalposts during play cynically to serve their own purposes. In practice, this obliged the court to put a red pen through swathes of the Scottish Bill.

It doesn’t matter that the Brexit Continuity Bill was generally within Holyrood’s powers when MSPs passed it – as a result of the delaying tactics and the chicanery of the UK Government, the power has been grabbed. Incapable of meaningful negotiation, unable to win on the substantive constitutional arguments – with this UK Government, all that’s left is force and guile.