IT’S 20 years this week since Donald Dewar, Scotland’s first-ever first minister, died unexpectedly whilst still in office. As we mark the anniversary of his untimely death, is his devolution project fatally damaged? If so what if anything can be done about it?

Dewar’s masterly scheme, that every power which was not specifically reserved to Westminster would be devolved to the Scottish Parliament, was reflected in the Scotland Act 1998 after a ringing endorsement from voters who voted by three to one to support reconvening Scotland’s parliament.

With such architecture underpinning it there was great confidence that this was meaningful home rule rather than the pathetic sop Scots had been offered in 1979. Donald Dewar’s magnificent patriotic speech at the official opening of the new parliament reflected this confidence and the considerable historical significance of the occasion. As did Winnie Ewing’s magisterial declaration that “the Scottish Parliament adjourned on the 25th day of March, in the year 1707, is hereby reconvened”.

READ MORE: Brexit: Internal Market Bill a step towards 'dictatorship', top judge warns

It is therefore particularly poignant that 20 years after Donald Dewar’s death, as the UK Internal Market Bill makes its way to the statute book, we are witnessing the destruction of his plan.

Whilst under the Scotland Act, Westminster always retained the power to make laws for Scotland, it was understood that it would not normally do so in relation to devolved matters without the consent of the Scottish Parliament. Until Brexit came along this was a convention that was honoured and even put on a statutory footing in the aftermath of the independence referendum.

What is so outrageous about the Internal Market Bill is its introduction of broad cross-cutting powers which will allow UK ministers to enforce internal market provisions across devolved areas. In addition, the bill reserves state aid to Westminster despite the devolved administrations’ insistence that it be devolved and UK ministers are also getting wide-ranging powers to spend in important devolved areas. To date it was understood they would spend only in respect of reserved powers and, normally, for devolved powers, financial transfers to the devolved administrations would go through the block allocation governed by the Barnett formula. This in short is why the bill constitutes a power grab rather than a power surge.

On Wednesday night I took part in a webinar on the implications of the Internal Market Bill for the rule of law. Although hastily organised by the International Bar Association Human Rights Institute it was hugely oversubscribed, with 1000 watching online and another 1000 unable to get on the call. It is now available to watch at ibanet.org.

I was asked to speak about the impact of the bill on devolution. I argued that what we are seeing is a rebalancing of the constitutional settlement in the United Kingdom with the clear delineation between reserved and devolved powers swept away.

Not only does this fly in the face of the promises made to secure a No vote in the independence referendum but it also flies in the face of the steps taken by Westminster to secure those promises in the Scotland Act 2016 – which enshrined the Sewel convention and entrenched the Scottish Parliament as a “permanent part of the UK’s constitutional arrangements” by providing it could not be abolished save by a decision of the people of Scotland voting in a referendum.

READ MORE: Joanna Cherry calls on SNP delegates to sack NEC members with 'vendettas'

So, the bill has implications not just for devolution but for the Union between Scotland and England. It is important that we don’t just look at that constitutional relationship through the prism of devolution. It has wider underpinnings including the Treaty of Union.

As I was speaking MSPs were voting overwhelmingly to withhold legislative consent to the bill. However, as we know from the bitter experience of the last few years, that won’t stop Westminster proceeding with it. In fact the only hope now of changing the bill is in the House of Lords and I don’t think I’m going out on a limb here if I say the focus of their attention will not be devolution, but rather the rule of law implications of the bill.

Rather like the UK Supreme Court, to date, the House of Lords has seemed relatively disinterested in defending the devolution settlement.

When the Scottish Government intervened in Gina Miller’s first case about the circumstances in which Article 50 could be triggered, the Supreme Court ruled that the Scottish Parliament did not need to be consulted and that, despite its statutory enshrinement, the Sewel convention does not give rise to legally enforceable obligations.

This has proved to be an important setback as throughout the Brexit process the UK Government have ignored the convention with impunity. The independent think tank the Institute for Government has said: “The Sewel convention has been broken by Brexit.”

So now it seems has devolution. What can be done about it? At the IBA seminar many felt that the only way the Internal Market Bill can be stopped is by court action, but they were worried that this would simply feed the Tories anti-lawyer and judge rhetoric.

Already in Northern Ireland citizens concerned about the impact the bill will have on the fragile peace process secured by the Good Friday Agreement have instructed solicitors.

I was asked if I would be crowdfunding to take proceedings in Scotland and replied that any legal action to defend the devolved settlement would be for the Scottish Government. Mike Russell has said that legal action has not been ruled out and there might be a range of legal actions open to the Scottish Government.

READ MORE: Joanna Cherry: Let’s not waste time on a devolution battle we cannot win

The Supreme Court’s dismissive ruling on Sewel poses a problem but the Supreme Court can overrule itself and distinguished commentators have argued that its previous decision was wrong.

These include Aileen McHarg, professor of Public Law at the University of Durham and Aidan O’Neill the QC who successfully argued the prorogation case and is currently appearing for Martin Keatings in the case before the Court of Session seeking to establish whether the Scottish Parliament has the competence to pass a bill to hold an independence referendum.

As the Scottish Government decides whether to litigate over the bill, such action should not be seen as a distraction from the goal of independence. Victory could be useful in preserving the ability of the Scottish Parliament to protect standards, for example in the field of agriculture and the environment, and alignment with the EU as we move towards independence.

Should the case be lost it would simply be another demonstration that it is only with independence that Scottish voters can get the policies for which they vote.