IT’S the latest twist on an old refrain - we wuz robbed. No sooner had the Supreme Court handed down its judgment on Holyrood’s Continuity Bill on Thursday, than the SNP cried foul.

The UK Government had cheated its way to a grubby sort of victory, Brexit supremo Michael Russell claimed. It had “changed the rules of the game midway through the match” and committed “an act of constitutional vandalism”.

The other lot were equally overblown in their rhetoric. Tory MSP Adam Tomkins said the judgment had “eviscerated” the Bill, vindicating his warning it was all “unlawful”.

As usual, the facts are more subtle. Both sides had something to celebrate and mourn in the decision.

So much has happened in just the last fortnight over Brexit, it seems an age since the Continuity Bill was the hot political topic of the hour, but in its way it was quite a sensation.

It was the first legislation passed by the Scottish Parliament since the start of devolution in defiance of advice from the Presiding Officer, who reckoned it was ultra vires.

MSPs passed it regardless, by 92 votes to 32, after the Scottish Government’s top law officer, the Lord Advocate James Wolffe QC, assured them it was competent.

It then became the first Holyrood Bill to have its legality challenged by the UK government, who referred it to the Supreme Court. And it is now the first Bill reduced to rubble by an Act later passed at Westminster against Holyrood’s will.

The Continuity Bill was meant to fend off the ‘power grab’ of scores of devolved powers due to be repatriated from Brussels at Brexit by ensuring their continuity in Scots law instead of their diversion to Westminster. Holyrood said this was legal, the UK Government said not.

The Supreme Court’s unanimous verdict was in two distinct parts.

First, it said the Continuity Bill as a whole was sound when passed in March. Only one section, albeit a pretty significant one giving Scottish ministers a veto over Westminster law, was out of order. But the rest of it was within Holyrood’s ambit.

It flatly rejected the UK Government’s claim that the Bill strayed into reserved matters and undermined the devolution settlement. Round one to Holyrood.

However, that was in March. Since then the EU Withdrawal Act (EUWA) designed to deliver Brexit had changed the “legal landscape”.

In particular, it had added itself to Schedule 4 of the 1998 Scotland Act, the select list of “protected” laws which are forever off-limits to Scottish Parliament tinkering.

That meant great chunks of the Continuity Bill, although fine back in March, are now kaput, or “not law”. It is up to Holyrood to decide what if anything can be salvaged from the wreckage. Round two and a technical knock-out to Whitehall.

It was this sequence - Holyrood Bill, UK legal challenge, EUWA changing the ground rules - that fuelled complaints of dirty tricks.

The timeline certainly does not look good for the UK government.

July 2017: EU Withdrawal Bill published. It says after it becomes law it will join Schedule 4 of the Scotland Act and be ‘protected’ from Holyrood changes. But it doesn’t say when exactly, only that a specific ministerial order will set the day.

February 27: Continuity Bill published at Holyrood. March 21: Continuity Bill passed by MSPs. April 17: UK government law officers refer Bill to Supreme Court for adjudication on its legality.

April 25: UK minister publishes an amendment to EU Withdrawal Bill saying it will now become a protected law the day it is passed.

May 2: Tory Advocate General for Scotland, Lord Keen, tables this timetable change amendment amidst a “series of very complex and extensive amendments” without flagging up its consequences.

May 8: amendment nodded through Lords without debate on it.

June 12: amendment is one of dozens jammed through Commons in David Lidington’s infamous 19-minute dash over the devolved aspects of Withdrawal Bill, an event so insulting it prompts the SNP to walk out of PMQs the next day.

June 26: EUWA Royal Assent.

July 24&25: Lord Keen and the Lord Advocate argue their corners over Continuity Bill at Supreme Court, but the game is already up. The EUWA has modified Scotland Act and become invulnerable.

Hence the cries of skulduggery and chicanery. Are they justified?

Not necessarily. The UK said from the start the EUWA would be protected law. It was only a matter of when. Whitehall sources say the late Lords amendment was a “cock up” and it should have been clear sooner that it would be immediate.

It’s easy to be sceptical about that, but there would have been no reason for a delay. Cock-ups are also ten-a-penny in Brexit. Elegant, remorseless conspiracies less so.

Referring the Bill to the Supreme Court at the end of the four weeks allowed does look like stalling, but it was also avoidable. The Lord Advocate could have referred the Bill himself the day it passed and sought an expedited ruling to speed it on its way. He sat on his hands.

Instead of inveighing against perfidious Albion, it might be better to think what would have happened if the Continuity Bill had received Royal Assent before the EUWA.

It would have been smashed to bits regardless. It would have been a much more public confrontation - Westminster dismantling a Scottish law in full view rather than on the sly - more politically damaging for the Tories and more useful to the SNP. But the result wasn’t in doubt.

Westminster would have pulled rank and reminded everyone which parliament was sovereign.

Holyrood was never going to get its own way on Brexit. It was always a question of how and when it would be shafted, not if. That’s a legitimate area of complaint right there. It doesn’t need a sterile conspiracy theory on top.