A week tomorrow the UK was supposed to be leaving the EU.

While it now looks almost certain that will not happen, the reprieve is currently only temporary.

Brexit is an outcome that, I must remind everyone, goes directly against the wishes of the majority of people in Scotland, 62 per cent of whom voted to remain.

And far from a smooth and orderly Brexit, the UK’s process of departure has been fraught, chaotic and hamstrung – as we saw again last night – by the UK Government’s own red lines.

I welcome Parliament’s decision to reject the government’s timetable for scrutiny of the Withdrawal Bill. The proposal was a disgrace and the way in which the PM sought to bully Parliament into accepting it was shameful.

The question now, though, is what should happen next.

My party’s MPs will consider next steps carefully when we have more clarity, both about the EU’s views on an extension and the intentions of the PM.

However, I will set out my view in general terms now.

I am clear – for reasons that will be obvious when I turn to the impact of the deal in Scotland – that the extension now secured should not just be enough to scrutinise a bad bill for a week or two longer.

It should in my view be long enough to allow a General Election or a referendum – or perhaps more realistically, the former leading to the latter.

That seems to me to be the only route out of this mess for the UK. Of course, for Scotland the best solution for the long term is to become an independent nation, able to take these crucial decisions for ourselves.

The fact is this UK Parliament is and will remain broken.

The deal proposed by the PM is deeply flawed.

And there is no sense that Brexit will be “done” even if this withdrawal agreement is ultimately passed.

Reaching a deal on the future relationship will be even more complex and difficult.

The UK is facing many more years of fraught negotiations on future arrangements.

And despite warm words, it is highly possible that with this deal a catastrophic “no deal” outcome has only been postponed until December next year.

That’s why putting this issue back into the hands of the electorate seems to me the best way forward.

However if the legislation does proceed, the consent of the Scottish Parliament and Welsh Assembly will be required. The UK government has explicitly accepted that fact.

So today I will set out why my government will not recommend that consent.

This is quite simply a bad deal and a bad bill.

It is bad for Scotland, bad for Wales and bad for people across the UK.

Indeed, the uniqueness of this event – the First Minister of Wales and I, of different political persuasions, uniting in opposition to the deal – is in itself a signal of how bad we believe it to be.

Those who voted for it last night voted to do real damage to all parts of the UK.

The Bill does not protect workers’ rights or environmental standards. References to a level playing field have been downgraded.

We have consistently argued that if we are to leave the EU we should be in both the customs union and the single market. This Bill does not deliver anything remotely like that.

Instead it paves the way for hard Brexit Free Trade Agreement that could wipe billions from the Scottish economy, and cost each person in Scotland £1,600 compared with EU membership.

Indeed, according to the Fraser of Allander institute, our economy is already £3 billion smaller than it would have been without this three year farce.

The Tory deal would also end freedom of movement which would be disastrous for Scotland’s working population.

And the processes for involving the Scottish and Welsh governments in negotiations over the future relationship with the EU and trade agreements with other countries is nothing short of a joke.

And while we support the Good Friday Agreement in its entirety and support a deal for Northern Ireland that protects it, these arrangements would place Scotland at a serious competitive disadvantage.

Of course, Scotland and Wales are, in some respects, in different positions.

The people of Wales voted narrowly to leave the EU, while the people of Scotland voted overwhelmingly to Remain.

I believe in independence, Mark does not.

But nobody in Scotland or in Wales voted for a hard Brexit.

Nobody voted to be made poorer; to lose their hard-won protections at work; or to see the environment put at risk.

And nobody voted to have the core principles of devolution trampled all over in a mad stampede to get out of the EU come what may.

As heads of the governments of Scotland and Wales, it falls to us to ensure that the roles and responsibilities of our Parliaments are respected and that the people we serve are protected.

So as Welsh Assembly Members made clear yesterday – and as I expect Members of the Scottish Parliament will also make clear – we do not consent to the EU Withdrawal Bill.

When this happens, it will be the first time in the history of devolution that both Scotland and Wales will have refused to give legislative consent to a bill that affects us both.

And the question for the Prime Minister is this – how will he respond?

The answer to that for Scotland will have long term consequences.

The Scottish electorate did not vote to leave the EU

A majority of Scottish MPs have voted against leaving the EU.

A majority of Scottish MSPs have voted against leaving the EU.

All of that has been ignored and disregarded.

We hear a great deal in House of Commons debates – understandably – about the views and interests of Leave supporting constituencies.

But the fact that the entire nation of Scotland voted to Remain is treated as irrelevant.

So if the Scottish Parliament does vote to withhold consent to this legislation, people will be looking closely to see if we are listened to or, yet again, ignored.

In conclusion, it is hard to imagine a Brexit deal more damaging to Scotland’s future prosperity and wellbeing than that proposed by the Prime Minister.

Any MP who votes for it should be in no doubt that they will be doing so, not just against the views of the majority in Scotland, but against our economic and social interests too.

My duty as First Minister is to do all I possibly can to oppose such a damaging outcome for the people I serve, and also to ensure that the voice of Scotland’s Parliament and people is heard and listened to.

That is what I intend to do. And I am proud to be standing alongside Mark as he also seeks to protect Wales from the damage that this deal would do.