WHITEHALL lawyers are already drawing up plans to challenge the Scottish Government’s Brexit Bill in the courts, The Herald understands.

Before any Holyrood legislation can get Royal Assent it has to be considered by the UK Government’s legal team and can be challenged by either the senior law officer, the Attorney General, or the Scottish law officer, the Advocate General, or even the Scottish Government’s own senior law officer, the Lord Advocate.

Whitehall has four weeks to consider the Scottish Parliament’s Continuity Bill, which is the Scottish Government’s attempt to protect the devolved settlement from what it regards as a “power-grab” by Westminster, and file a legal challenge to the highest legal authority on the constitution, the UK Supreme Court.

READ MORE: Nicola Sturgeon urged to avoid repeat of "Scottish shambles" in China

Senior UK Government sources have suggested it was “a matter of course” that lawyers were now drawing up a legal challenge to prevent Nicola Sturgeon’s Brexit Bill becoming law.

Baroness Hale, the Supreme Court’s President, told the Lords Constitution Committee this week: “There might be challenges to or from the devolved legislatures and governments relating to the location of powers; that's looking more and more likely as we speak."

The four-week period is due to end on April 28. However, the UK Government’s flagship EU Withdrawal Bill is still going through the House of Lords and is not expected to reach the key vote at Report Stage until mid-May.

If there were no legal challenge to the Continuity Bill, then it would become law.

While the UK Government insists it is continuing to work hard to get agreement with the Scottish Government on the Withdrawal Bill, sources on both sides have expressed serious doubts that the gulf can be bridged.

READ MORE: Nicola Sturgeon urged to avoid repeat of "Scottish shambles" in China

It is likely that Whitehall lawyers will lodge a legal challenge to the Continuity Bill while their political masters will insist they are continuing to seek agreement on the Withdrawal Bill with Edinburgh.

Yet if the Continuity Bill went unchallenged and became law and the Withdrawal Bill passed through its parliamentary processes and also became law, then a power struggle between Whitehall and Holyrood would ensue and probably end up at the Supreme Court.

Asked about the possibility of a legislative power struggle, a UK Government spokeswoman said: “Our focus continues to be on finding an agreed way forward with the devolved administrations on the EU Withdrawal Bill.

“Everyone agrees this is the preferred option. As with all Scottish Parliament bills, the competence of the Continuity Bill will be considered by the Law Officers.”

In any case, a constitutional clash seems unavoidable at some point.

Even if there were agreement on the Withdrawal Bill, it is hard to see how the First Minister could recommend MSPs give their consent to the Brexit Fisheries Bill given Ms Sturgeon herself as branded the transitional deal a “massive sell-out” to Britain’s fishing communities.

Moreover, it is even harder to see how the FM could recommend Holyrood giving its consent to the final piece of Brexit legislation, the Withdrawal Agreement and Implementation Bill, which will put the final deal with Brussels into UK law, given it is set to take Britain out of the single market and the customs union.

Meanwhile, the Attorney General, Jeremy Wright, has said it is "not the Government's intention" for judges to have to make political judgements after Brexit.

READ MORE: Nicola Sturgeon urged to avoid repeat of "Scottish shambles" in China

At Commons question-time, Joanna Cherry, the SNP’s justice spokeswoman, raised Clause Six of the Withdrawal Bill, noting how Baroness Hale had described it as “very unhelpful” as it could “leave the judiciary at risk of appearing to make a political decision”.

Mr Wright insisted this was not the Government’s intention.

“We don't expect judges to make political judgements. Indeed, we absolutely want them not to do that.”

He added: "But what we do want them to do is to be able to interpret the law as it will stand post-exit with all the necessary guidance that we can give them and we'll continue to work with them to provide the necessary clarity."