THERE was complete disarray in Holyrood today after the Presiding Officer rejected the Scottish Government’s alternative Brexit repeal bill, claiming it was not within the legislative competence of the parliament.

The Scottish Government has “respectfully” disagreed with Ken Mcintosh’s judgement, saying their legal advice from the Lord Advocate suggests it is well within the power of the MSPs to make the bill law.

READ MORE: Nicola Sturgeon reveals Scotland's alternative Brexit Bill in dramatic clash with Westminster

And to make it all even more confusing Mcintosh’s counterpart in the Welsh Parliament reached a different conclusion about a near identical continuity bill with the government in Cardiff.

The continuity bill will act as a sort of legislative and administrative solution if the UK Government and Scottish Government cannot agree over the Westminster’s EU withdrawal bill.

Currently they are stuck over whether 25 powers to be devolved from Brussels should return to London or Edinburgh.

If they can’t agree then it’s likely the Scottish Parliament will refuse to consent to pass the EU withdrawal bill when it comes to a vote.

READ MORE: Mike Russell's statement on Scotland's landmark alternative Brexit Bill in full

The Scottish Government say this new continuity bill is to act a stop gap if that happens. However, the presiding officer has not backed the move, saying it is not for Holyrood to legislate on.

Scottish Brexit minister Michael Russell insisted his new bill didn’t mean a deal between the devolved governments and Whitehall was over, but said this was a “belt and braces” approach.

He pointed out that this was the first time since the Scottish Parliament had resumed in 1999 that a Presiding Officer had warned a government that their Bill was "not within the legislative competence of the Parliament".

ANALYSIS: We're in debatable lands constitutionally – but the Scottish Government is right to be bold on Brexit Bill

"We recognise that, we are mindful of what a serious moment it is."

Russell said the bill would be fast tracked through the parliamentary process: "If the UK Government drops its power grab then it may still be possible to reach agreement, in which case we would not need to proceed with the continuity bill.

"But we are proposing this bill should be put through on an emergency timetable to ensure it becomes law in time to make the necessary preparations.

“The Continuity Bill, if passed, will retain our EU derived law and give the government and parliament the powers they need to keep those laws operating.

"It will assert this parliament's right to prepare our own statute book so that the same rules and laws will apply as far as possible after withdrawal."

He added: "The Scottish ministers are satisfied that it is within the powers of the Parliament to prepare for the devolved legislative consequences of the decision of the UK to leave the EU."

Tory MSP Adam Tomkins said the Bill was “both unwelcome and unnecessary,” and warned that the publication of the bill would impact on negotiations between the UK government and the devolved governments.

The Lord Advocate, Scotland's top law officer, will address Holyrood on the legality of the continuity bill on Wednesday.