In the run-up to the establishment of the Scottish Parliament under Labour in the 1990s, STV produced a speculative drama-documentary that imagined a scenario in which Scotland became independent without the SNP even having taken power.

The basic assumption was that there would inevitably be a Tory resurgence south of the border, and a hard-right Prime Minister would eventually take power hell-bent on dismantling devolution. While the people of Scotland had sullenly tolerated unfettered Thatcherite rule from London in the 1980s, the programme’s theory was that they would never accept being stripped of a measure of self-government they had already enjoyed for several years. If forced to choose between the abolition of devolution and full independence, they would plump for the latter.

This seemed to be a genuine, nagging concern across the ranks of the pro-devolution parties in the earliest days. In spite of there being a prolonged spell during 1998 when the SNP enjoyed an unprecedented outright lead in the opinion polls, the belief was that the Holyrood voting system was essentially "Nat-proof", and that the real threat to the stability of devolution lay in the possibility of "some unhinged Thatcherite like Michael Portillo" seizing control of the Tory party, and then of the country. (This was back in the days when Michael Portillo still seemed like an unhinged Thatcherite.)

The fears receded as devolution bedded in. The Tories began paying lip-service to the idea that devolution, while unwise, was not a reversible process. Gradually that message became more sincere - partly because they came to realise that any threat to devolution might indeed imperil the union, and partly because it was hard for any party to prosper in the Scottish Parliament without displaying a degree of commitment to the institution. The Tories’ reinvention as a pro-devolution party was completed with the Cameron government making two transfers of additional powers to Holyrood (albeit under enormous pressure from both the SNP and the electorate).

The fact that successive Labour and Conservative governments had faithfully treated devolution as a one-way street, with extra powers being occasionally granted to Edinburgh but existing powers never taken away (leaving aside a bizarre exception involving Antarctica), gave rise to a prevailing wisdom among constitutional experts that a more-or-less inviolable convention had been established that powers could not be removed by Westminster without the Scottish Parliament’s express consent. Following the notorious “wow” issued to head off defeat in the independence referendum, that convention was even, for the first time, written into law.

And yet only a matter of months after Britain’s vote to leave the European Union and Theresa May’s elevation to the office of Prime Minister, any complacent assumptions about the worth of Westminster conventions, including ones that are acknowledged within legislation, have been utterly blown to smithereens.

Under the terms of the existing devolution settlement, powers over Scottish agriculture and fisheries currently held by Brussels will transfer automatically to Edinburgh after Brexit. No ifs, no buts, no maybes – that’s the law. And yet the Scottish Tory leader Ruth Davidson has mysteriously announced that all powers held at EU level will instead revert to London in the first instance, and only then can there be a discussion about which ones, if any, will be passed on to the Scottish Parliament.

If that statement is to become a legal reality, it will require more than merely a minor exception made to the convention that supposedly protects devolution. That convention will have to be bludgeoned to death. Huge policy areas that have been legally devolved ever since 1999 will have to be snatched back, without the Scottish Parliament’s consent.

It was perhaps to be expected that the UK government would seize the opportunity of Brexit to try to replace EU regulation over devolved matters with a degree of UK-wide regulation. However, the assumption was that this would happen as a result of negotiation with the Scottish Government, whose agreement would come at the price of concessions elsewhere.

It turns out that London no longer has the remotest interest in the views of Scotland’s elected representatives. Armed with a Supreme Court ruling that says the supposed legal entrenching of the Scottish Parliament wasn’t worth the paper it was written on, Theresa May will simply rewrite the devolution settlement as she sees fit. There have been increasingly strong signals in her own speeches and those of her ministers that she will go much further than anyone had thought possible even a few weeks ago, and will not stop at powers that are currently held in Brussels. The menacing mood music suggests she may also seek to establish a degree of London ‘oversight’ and ‘coordination’ in relation to matters that have been entirely the province of the Scottish Parliament for almost two decades.

In an astonishingly short space of time, then, the clock has been wound back on our understanding of how safe devolution is from a hostile Tory government. We haven’t yet reached the point where the outright abolition of the Scottish Parliament has become thinkable – but for how much longer?

What we’re witnessing is essentially how Mrs Thatcher would have dealt with devolution if she had inherited it – treating it as an enemy that can be ‘defeated’ through strength as opposed to appeasement. After a lengthy softening-up process, perhaps she would indeed have attempted abolition in much the same way she eventually dealt with Ken Livingstone and the GLC.

Folly of the Iron Lady

But if Theresa May is labouring under the delusion that this is a strategy that has the remotest chance of success, she should urgently reflect on Mrs Thatcher’s actual impact on the constitutional debate in Scotland.

Between 1979 and 1990, a roughly 50/50 split on devolution was transformed into a “settled will” in favour of a powerful Scottish Parliament, and full independence went from being a fringe enthusiasm to a commitment that was shared by roughly one-third of the population. The effect of any repeat performance under May scarcely needs spelling out, given that at present nearly half of Scots back independence.

Indeed, the only reason there isn’t already a narrow pro-independence majority is that a small percentage of “Yes” voters from 2014 have wavered due to their pro-Brexit views. But however strong their dislike of the EU, any attack on devolution is likely to see these people rally to their original cause. Unless a trusted adviser can awaken the Prime Minister to her folly, that TV programme from twenty years ago may yet prove to be astonishingly prophetic.

The SNP won’t so much have won independence – it will have been handed to them, gift-wrapped and on a plate, by an over-reaching Tory government in London.

James Kelly's blog, Scot goes POP!, is among the most popular political blogs in the UK. He has also contributed to a number of newspapers and magazines.

You can check out the blog here or follow James on Twitter.

James has also written for us about the madness of King Trump, the crisis created by the Brexit legal challenge and why Scottish Labour care more about Corbyn than their country.