HOLYROOD must have a vote on the final Brexit deal, the SNP leadership has insisted, raising the possibility of an 11th hour constitutional clash with Westminster just weeks before Theresa May is due to sign the withdrawal agreement with Brussels.

Ian Blackford, the SNP's leader in the Commons, said the final Brexit agreement must be signed off by MSPs but the legislation looks certain not to contain Nicola Sturgeon’s red line demand to keep Scotland in the single market and customs union.

If MSPs voted down the deal, it would trigger a major constitutional crisis between the parliaments and governments, as it could leave the Prime Minister with no option but to override Holyrood in order to hit the March 29 2019 departure deadline.

Such a move would then pose the First Minister with a seminal decision: whether or not to call on the Conservative Government to facilitate a second Scottish independence referendum; something Mrs May has pledged not to do in this parliament.

As the PM currently struggles to get the support of the SNP administration for MSPs to endorse the first key piece of Brexit legislation – the EU Withdrawal Bill – Mr Blackford noted how the political stakes would be much higher on the final key piece of Brexit legislation - the Withdrawal Agreement and Implementation Bill.

This bill will put the UK-EU withdrawal agreement into domestic law. At present, it is set to contain Mrs May’s central proposal that Britain will leave the single market and the customs union; something which the SNP leadership has made clear would lead to a second referendum on Scottish independence.

Asked if Holyrood would have to give its consent, through a so-called Legislative Consent Motion, to the Implementation Bill before the deal is signed and sealed, Mr Blackford replied: “Absolutely. It’s fundamental to our future. I would expect the Government would recognise they have to come to the Scottish Government and Scottish Parliament for an LCM. They have to begin to treat the devolved institutions with respect.”

The Highland MP warned that if Mrs May sought to disregard a refusal by the Scottish Parliament to give its consent to the final Brexit deal, politically this would “not be a brilliant place[for the UK Government] to be in”.

Asked if Britain would be facing a constitutional crisis if Holyrood withheld an LCM on the Implementation Bill, he replied: “Well, that could be. But there are a lot of moving parts to all of this. The ground has shifted quite significantly over the course of the last few months.”

Mr Blackford suggested the Democratic Unionists had effectively guaranteed an open border between the Irish Republic and Northern Ireland ie the EU and the UK. “The reality is you are going to have to be in effect close to the single market and potentially the customs union to make that work.

“Of course, the language from the PM is ‘we are not staying in the single market and the customs union’ but I just wonder what is actually happening within the UK Government…The hard Brexiteers feel as if they are being pushed back.”

The SNP leader added: “What is becoming increasingly clear to people is being out of the single market and customs union will cause an enormous economic threat…I do think things are shifting and it’s even more important the devolved administrations are part of this process.”

Appearing before the Lords EU Committee, Damian Green suggested the UK Government was moving closer to agreement with the Scotland Government on the Withdrawal Bill.

“I have observed over the past three months the degree of progress we have made," explained the First Secretary of State, who said there was a “common interest” of both governments to have, post Brexit, a working Statute Book and barrier-free trade across the UK.

As MPs engaged in the eighth and final day of the Withdrawal Bill’s committee stage, Mrs May pointed to her administration accepting a compromise amendment on putting the actual date of Brexit in the legislation and thus avoiding the possibility of a second Commons defeat.

She stressed the UK Government remained committed to leaving the EU at 11pm on March 29 2019, noting how the power to change the date, contained in the amendment, would only be used in "exceptional circumstances for the shortest possible time".

Later, appearing before the Commons Liaison Committee, the PM said she believed negotiations on a free trade agreement could be completed before Brexit day.

"That is what we are working to and that is what I believe we can do," she declared.

In Brussels, Michel Barnier, the EU’s chief negotiator, suggested the transition period would last 21 months and end in December 2020 but No 10, which has pointed to a two-year timescale, made clear this was an opening salvo from Brussels in the phase two process and that such a proposal would be part of the negotiations.