Theresa May has until next Tuesday to table a new amendment to the EU Withdrawal Bill in the House of Lords in her bid to get the consent of Nicola Sturgeon and her colleagues after months of political wrangling.

A failure to do so could spark a constitutional crisis as the Prime Minister is intent on pushing through the “vital” flagship legislation - which transposes all EU law into domestic law - with or without the backing of the Scottish Parliament and Welsh Assembly.

Whitehall insiders say that, while it is not impossible a last-minute deal with Edinburgh could be done after next Tuesday, parliamentary process means this is the deadline they are working towards as sufficient time is needed thereafter to allow the new amendment to Clause 11 of the bill to be perused by peers before a key debate takes place in the upper chamber; this is set for Wednesday May 2, the fifth of six days of the Report Stage.

READ MORE: Pressure on Shona Robison to resign over NHS 'failures'

One UK Government source noted that meeting next Tuesday’s effective deadline was the “thickest wire we’ve had to overcome so far”.

While David Mundell, the Scottish Secretary, has maintained an optimistic air that a deal with Edinburgh will be done - albeit conceding talks will “go to the wire” - SNP sources have maintained a more pessimistic outlook given the UK Government has not shifted its position on the legislation, which the Scottish and Welsh Governments regard as a “naked power-grab”; an assertion denied by Whitehall.

Ian Blackford, the Nationalist leader at Westminster, made clear the FM was not going to budge and that the Prime Minister would have to “see sense” and blink first.

He said he did not understand why Mr Mundell was so confident of a breakthrough, expressing surprise at how his Tory colleague David Lidington, Mrs May’s de facto deputy, had “dug his heels in” over the issue.

“For the life of me I don’t see why it is in their interests to be so intransigent,” declared the Highland MP, insisting: “They have to show respect; that’s what is lacking at the moment. If we end up in the Supreme Court, then we end up in the Supreme Court; we’ll take matters from there.”

READ MORE: Jeremy Corbyn would be a better prime minister than Theresa May, claims author Lee Child

Asked if the PM did not concede to the First Minister’s demands, could there still be a deal with Edinburgh, Mr Blackford replied: “No. There won’t be; there can’t be.”

As officials from both governments continue with intense talks to try to square the constitutional circle, Mr Blackford said he was seeking an eleventh-hour meeting with Mr Lidington, who has been leading for the UK Government in the intergovernmental talks.

Ms Sturgeon has made clear the governments are now “reaching the end game” and has expressed regret that the Conservative Government have taken Holyrood’s Continuity Bill to the UK Supreme Court, which, she suggested, would affect “the spirit” of the negotiations.

During an Urgent Question in the Commons on Wednesday, the SNP’s Pete Wishart said the legal challenge had exposed the UK Government’s “utter contempt” for the Scottish Parliament.

His Nationalist colleague Joanna Cherry asked: “Why is this Tory Government seeking to defeat a bill in the courts, which it couldn't defeat by democratic means in the Scottish Parliament?”

Jeremy Wright, the Attorney General, said a "substantial part" of the Holyrood bill was a "re-run of amendments she sought to get passed in this House and failed to do so".

He told MPs the Scottish and Welsh Continuity Bills raised “serious questions about legislative competence that need to be explored”.

Mr Wright warned if they became law, “there would be impacts not just on the governments and legislatures but on widespread understanding of and confidence in UK law after exit”.

READ MORE: UK proposals on Irish border after Brexit rejected in Brussels

Kirstene Hair, the Conservative MP for Angus, claimed the SNP Government’s Continutiy Bill was a "political manoeuvre" designed to instigate another independence referendum.

Whitehall insiders expect the Supreme Court to hear the case in June, although there is no indication so far that UK ministers have requested the case be expedited. The court’s summer recess begins at the end of July and runs through to October.

Given the unprecedented nature of the case, it is possible that 11 of the 12 court justices could sit; the same number who heard the landmark Article 50 case.

If the judges ruled in Edinburgh’s favour and the EU Withdrawal Bill also became law, then there would be two competing pieces of legislation on the statute book, which would mean a return to the Supreme Court for the justices to rule on which one took precedence.