AFTER months of build-up, we finally have a deal. And what a thing of beauty it is. This monumental act of self-harm is making almost everyone unhappy. From the Brextremists of the Rees-Mogg tendency and the arch-Unionists of the DUP, right through to ardent Remain supporters and the independence movement in Scotland.

The reaction to the deal is telling. Labour’s priority is to agitate for an election, yet we know from opinion polls they have failed to land a blow on this hapless Tory government, so the great Corbyn victory they are hoping for looks as distant as ever.

READ MORE: Sturgeon urged to call second independence referendum as Tories implode

Don’t get me wrong – I’d love to see the back of the Tories tomorrow. But neither main party seems capable of uniting behind a manifesto which cuts through the Brexit shambles. It’s hard to see how an election would actually resolve this crisis.

But if the UK Parliament votes down the deal, as everyone expects, it must still lead to an opportunity for the public to have their say. If MPs can’t sort this out, the people must be given the chance to stick with the good deal we have as members of the EU, with our rights and freedoms as EU citizens protected. I’m glad that the People’s Vote campaign now has the clear majority backing of the Scottish Parliament.

It’s also time that Scotland’s First Minister decided on the next steps for Scotland to decide its own future. Last year Nicola Sturgeon said she would update the country on plans for an independence referendum once the Brexit negotiations were over and the details of the deal became known. Well, we have those details – they don’t look pretty.

The case for Scotland choosing its own future grows stronger with each day. The Brexit calamity gives the issue greater immediacy but, frankly, even if Brexit is killed off the past two years have proved beyond doubt the level of contempt Scotland is shown inside the UK. As campaigners, we all want to know what timescale we’re working to.

In the meantime, my Green colleague Andy Wightman is leading a legal bid to answer a very straightforward question. If MPs instruct the UK Government to revoke the Article 50 notification, could it do so knowing what legal effect that would have? Only the European Court of Justice can answer that question, and it soon will.

The answer could have profound implications for the future of all of us and will provide a degree of clarity that’s urgently needed.

READ MORE: BMA hits out at appalling treatment of EU doctors

Throughout this whole process, the voice of Scotland has been ignored. It’s a bizarre irony that while Theresa May’s deal tries to offer something to every other part of the UK – England and Wales get to leave, which they voted for; Northern Ireland and Gibraltar get essential recognition and arrangements for their special status – it’s still being rejected by everyone.

So though Scotland is shown the greatest contempt, we are by no means alone in rejecting this deal.

This has been a period of such confusion and chaos, but one thing is as clear now as it has ever been. Scotland will only get the strong future relationship we want with Europe – as the overwhelming majority voted for – if we’re a full, independent member of the European Union.

I’m reminded of what the former Daily Record editor, Murray Foote, said when he came out in support of independence earlier this year: “For me, independence is about autonomy, allowing Scotland to meet success and failure on its own merit and not point an embittered finger of blame at anyone else.”

That argument is bound to be crystallising in people’s minds – including many who voted No in 2014 but who are open to persuasion given the democratic outrage unfolding day by day.

One day soon, perhaps very soon indeed, people will sit down to write Theresa May’s political obituary. They will look back at what they wrote when David Cameron left Downing Street, universally acknowledged as the prime minister who led the UK into a pointless and unnecessary crisis and then walked away from the mess. Could any prime minister fail more spectacularly? Well, now they have an answer.

What history will make of Theresa May we can only wonder. The prime minister who walked in with a parliamentary majority, then threw it away; who refused to come down on one side or the other of her party’s 30-year internal civil war; who sent minister after minister over to Brussels to chase unicorns; and who pinned her own colours to the mast of an already sunken ship.

Let’s not go down with them. It’s time we charted our own course, and offered the people of Scotland not impossible promises but a secure future as a member of our European family. It’s time – once again – to say Yes.