It is not typical for a Minister to come to the chamber to tell members that they regret the introduction of legislation, but that is the situation I find myself in today. I regret that the Scottish Government now feels compelled to introduce the UK Withdrawal from the European Union (Legal Continuity) (Scotland) Bill. I regret it because it is about preparing for an event – the UK leaving the European Union – that I do not wish to happen and which is, of course, contrary to the wishes of the people of Scotland, 62 per cent of whom voted to remain in the EU.

And I regret it because it never needed to come to this.

Presiding Officer, it is important to set out how we have reached this situation and what the options are before us.

READ MORE: Major clash between Holyrood presiding officer and Scotland's top lawyer over Brexit Bill

When the UK Government published its EU Withdrawal Bill in July last year it was no surprise that its approach to devolution was careless and lacking in understanding.

After all since June 2016, the devolved institutions, including this government and this parliament, have been denied any meaningful input into the Brexit process despite the clear and agreed terms of reference of the JMC (EN) of which I am a member.

There was no consultation on the content of the bill prior to us seeing it in finished form two weeks before its publication. That was contrary to all good and established practice with bills that are going to require legislative consent from this parliament.

READ MORE: Nicola Sturgeon reveals Scotland's alternative Brexit Bill in dramatic clash with Westminster

We would have been justified, when the bill was published, in walking away from such a boorach. But instead - and I pay tribute to all the parties in this parliament - as a Parliament we have put a great deal of time, resource and effort into trying to make it a workable piece of legislation to which we could agree.

Presiding Officer, no matter how much we oppose Brexit, a Withdrawal Bill is - and we have always made this clear - a proper and necessary step. Our laws must be prepared for the day the UK leaves the EU. If we did nothing, laws about matters such as agricultural support or the rules that ensure our high food standards would fall away entirely, and many others would stop working the way they were intended. However, the bill as drafted and which has now been passed by the House of Commons, despite amendments proposed by the Scottish and Welsh Governments and by the opposition parties, allows Westminster to take control of devolved policy areas, in order, according to the UK Government, to allow UK-wide arrangements or frameworks to be put into place after Brexit.

It is important to stress this fundamental point before addressing the detail. This whole debate is about the existing powers of this Parliament – powers in relation to policy areas, such as farming, fishing, justice and the environment, for which this Parliament already has responsibility.

The discussion about the way forward is therefore not an abstract one. It is, first and foremost, about protecting the devolution settlement that people in Scotland voted for so decisively in 1997. But it is also about the best way to run important national and local services like our Health Service, the best way to provide agricultural support - such as Less Favoured Area Payments which are essential in Scotland but not used in England - the best way to devise Procurement rules that are tailored to Scottish need and Scottish business and the best way to protect and enhance our particular environment, consisting as it does of large areas of coast and sea. At present in these islands we have a unitary, but not a uniform market. With the freedom to innovate we have brought forward world beating Climate Change legislation, are in the process of implementing minimum unit pricing for alcohol and have been able to tailor business support to specific local need.

Of course we have always been clear that we accept in principle the need for there to be UK-wide frameworks on some matters. We have been working constructively with the UK and Wales to investigate those issues and explore how such frameworks would work. The key priority for us is, however, to ensure that these are always in Scotland’s interests, as this Chamber would expect.

Accordingly what is covered by any UK frameworks, how they are governed and any consequent changes to the devolution settlement must only be made with the agreement of this Scottish Parliament.

It is simply not acceptable for Westminster to unilaterally re-write the devolution settlement and impose UK-wide frameworks in devolved areas without our consent.

That is why we, and the Welsh Government, have been working so hard to ensure this bill both protects devolution and does the job it is supposed to do.

Of course, Presiding Officer, opposition to the EU Withdrawal Bill, as currently drafted, extends far beyond both the Scottish and Welsh Governments.

This Parliament’s Finance and Constitution Committee concluded unanimously that clause 11, which constrains devolved powers, was “incompatible with the devolution settlement” and – importantly – that clause 11 was not “necessary to enable the agreement of common frameworks”. In the House of Lords, the former head of the UK civil service called the treatment of Scotland, Wales and Northern Ireland in the Bill “indefensible”.

Lord Hope, former deputy President of the Supreme Court and the convener of the cross-bench peers, even described the Bill’s approach to devolution as having “a touch of Cromwell” about it. He has also re-tabled the joint Scottish and Welsh Government amendments for consideration during the Lords stages of the Bill.

And the Scottish Parliament’s first Presiding Officer, Lord Steel, described how the Bill threatened Scotland’s “stable and sensible form of government”.

Faced with such an array of views from all parties, the UK Government has now accepted that the Bill must change.

Regrettably despite its promise it failed to bring forward an amendment in the House of Commons, but last week it finally put a proposal on the table.

However, this new amendment to the bill would still allow the UK government to restrict the Scottish Parliament’s powers unilaterally, through an order made in the UK Parliament, without requiring the consent of either the Scottish Parliament or Government.

Under the latest proposition – set out publicly by David Lidington yesterday – the UK Government would decide whether the Scottish Parliament’s powers in, relation to any area currently covered by EU law, should be constrained or not.

As a result this new proposal remains unacceptable to both the Scottish and Welsh Governments.

UK ministers insist we have nothing to worry about because they will “consult” the devolved administrations before deciding whether to constrain the powers of this Parliament.

Presiding Officer, the track record of consultation here is not encouraging. The UK Government has failed to meet similar commitments to Scotland in relation to the wider Brexit process.

And it is impossible to take seriously the UK Government’s argument that they need to constrain the powers of this Parliament for economic reasons.

It is frankly risible for UK ministers, pursuing an economically disastrous hard Brexit, to say they must reserve the right to impose UK-wide frameworks in devolved areas for reasons of economic stability.

Despite all this, Presiding Officer, there remains a basis on which to reach agreement and the Scottish Government remains committed to that objective.”

The Scottish and Welsh Governments will be meeting UK Ministers next week to continue to discuss the changes that must be made. We will suggest amendments to the UK Government’s proposal that would make it work with, not against, devolution.

However, as a government, we recognise the reality of the position we find ourselves in. If there is not a change in position by the UK Government, we will be faced with legislation to which we cannot recommend that this Parliament gives consent.

In that situation, we believe that the constitutionally correct position, consistent with the devolution settlement, would be for the UK Government to remove those matters not consented to from this Bill, and for this Parliament to make its own provision in that regard. That is why we believe it is incumbent on the Scottish Government to provide an alternative means of ensuring, for areas of policy within the competence of this Parliament, legal certainty and continuity in the event that the UK does leave the European Union.

That is what the Continuity Bill which we have introduced today does. Similar steps are being taken by the Welsh Government, which published its own very similar Continuity Bill earlier today. My Welsh counterpart, Mark Drakeford, has just made a statement to the National Assembly setting out his government’s proposals.

The Continuity Bill will, if passed, will retain our EU-derived law and give the Government and Parliament the powers they need to keep these laws operating. It will assert this Parliament’s right to prepare our own statute book, so that the same rules and laws will apply so far as possible after withdrawal.

It has been introduced today to ensure that it can be put in place prior to the final passage of the Withdrawal Bill. That is essential if this Parliament decides not to give the Withdrawal Bill legislative consent. The Minister for Parliamentary Business has, accordingly, written to you, Presiding Officer, proposing an emergency timetable which will be put to the bureau, and which I hope parliament will agree to later this week. That timetable proposes that all stages of the bill take place in plenary session – enabling all MSPs to participate.

Members will also be able, if their committees so chose, to take evidence on the bill and I will make myself available to any such committee at any time. The period of scrutiny will be shorter than normal but there needs to be intense examination of the proposals and the Scottish Government will do everything it can to enable that. Presiding Officer, the Continuity Bill is contingency planning. It provides a sensible scheme for preparing devolved law for EU withdrawal. But if the EU Withdrawal Bill can be agreed, and if this Parliament consents to it, the Continuity Bill will be withdrawn.

And even if the Continuity Bill is passed by this Parliament, it contains provisions for its own repeal. If a deal can be reached with the UK Government, we would be able to come to Parliament with a proposal to give consent to the EU Withdrawal Bill, and repeal this one.

Now, Presiding Officer, let me turn to your statement on the Bill’s legislative competence.

The Presiding Officer has said that, in his view, the provisions of this Bill are out with the legislative competence of the Scottish Parliament. He is entitled to this view, but we respectfully disagree.

The Scottish Ministers are satisfied that it is within the powers of this Parliament to prepare for the devolved legislative consequences of the decision by the UK to leave the EU. We do not agree with the Presiding Officer’s view that it is incompatible with EU law to legislate in anticipation of what is to happen when EU law no longer applies. EU law itself envisages that a member state may withdraw from the EU in an orderly manner conducive to legal clarity and certainty. Under the Scotland Act, we can only introduce Bills into Parliament where we are so satisfied; for this Bill, the Deputy First Minister has made a statement to that effect. And as the Ministerial Code makes clear, any such statement must have been cleared with the Law Officers; I can confirm – as the Ministerial Code allows me to confirm – that the Lord Advocate is satisfied that this Bill is within the legislative competence of the Parliament. Accordingly the Lord Advocate will be providing a written statement to that effect later today and, subject to Parliament’s agreement, he will make an oral statement in this chamber on this Bill tomorrow and be open to questions on it.

To be clear about what this means: the Presiding Officer’s statement on legislative competence does not in any circumstance prevent the Scottish Government from introducing or progressing any Bill.

By triggering Article 50, the UK Government has put the UK on a path which leads out of the European Union. As I have set out, we have a duty to act to protect and preserve those areas of EU law that are within the responsibility of this Parliament.

If we do not make those preparations now and we cannot agree to the Withdrawal bill we would have to wait until we have already left, and EU law has stopped applying in Scotland, before this parliament took necessary precautions. That would be an unacceptable basis on which to invite Parliament to do this essential preparation.

Article 50 has been triggered; without a drastic change of circumstances, which of course many of us still hope for, regrettably it is more than likely that the UK is leaving the EU. This Bill is a necessary response to that fact.

We recognise that the Bill is novel. But we should not be surprised that an event like EU withdrawal is giving rise to novel legal situations. This is the first time since the re-convening of the Scottish Parliament in 1999 that a government has introduced a Bill when the Presiding Officer has not been satisfied as to legislative competence. We recognise that and we are mindful of what a serious moment this is.

However the fundamental point cannot be escaped. This issue is too important for it to be either my decision, or that of the Presiding Officer, whether this bill is passed. All of us in this chamber have a duty to debate this issue over the coming weeks. All MSPs will listen to the arguments and then collectively we will all decide if this bill should become law.

It will be a decision not of the Scottish Government but of this, our national Parliament, and that is how it should be.

That is why we are bringing forward this bill. I began this statement by saying that I regretted having to introduce this Bill and that is right. I do. I regret what appears to be the unfolding disaster of Brexit. In my active political life, which has lasted for more than 30 years, I have never known a time of greater instability nor a time in which it has been harder to predict what lies ahead.

But the core issue for this Parliament is simple. Our primary duty is to serve the people of Scotland and protect their interests. It is our obligation - it is, indeed our duty - to protect the devolution settlement the people of Scotland voted for. That is what we are endeavoring to do despite all the difficulties.

I welcome the cross party agreement there has been on that substantial point and I hope it can continue despite the pressures upon it.

It is in that spirit that I make this statement to Parliament today.