SNP ministers have been accused of "farming out" IndyRef2 legislation to the Supreme Court because they didn't like answers from their top law officer.
James Eadie KC was speaking on the second day of a hearing in London on who has the power to call a referendum on Scottish independence.
The top lawyer, representing the UK Government, accused the Scottish Government of only turning to the Supreme Court because its plan to stage a vote could not be cleared by its own advisers.
Westminster has refused to agree to Nicola Sturgeon's plan to hold a referendum next year and claims powers over the matter are reserved.
Eadie claimed the problem in the case was the Scottish Government did "not like" an answer it received from the Lord Advocate on whether Holyrood can stage a referendum without prior approval from Westminster.
He told a panel of five judges that legislation put forward by Sturgeon was at too early a stage for the Supreme Court to rule on.
Lord Advocate Dorothy Bain, representing the Scottish Government, had yesterday called on the court to solve the "festering issue" of who had the power to call a referendum on independence. But Eadie today rejected that argument and claimed it risked “dragging the court into the political process”.
He told the court that a person in charge of a Bill at Holyrood must make a “positive” statement that it is within the competence of the Scottish Parliament. The barrister said this was part of the “pre-legislative safeguards” that exist in law, and with the UK Parliament including such a provision so someone in charge of a Bill can “pin their colours to the public mast on competence”.
“It is for the person in charge of the Bill to form that view,” he said, adding it is not “simply to be farmed out to the Supreme Court”.
Sir James said this would be inviting justices “to, in effect, provide advice to the person in charge of the Bill and or the law officer”. He said the logic of the Lord Advocate’s position was “uncontrolled and surprising”.
Discussing the competence of the proposed Bill, he said: “It isn’t as though the Lord Advocate, in this case, cannot answer the question in 31.1 (of the Scotland Act). The difficulty is that she can answer it and has done so. The problem for her is that the Scottish Government do not like the answer that she has given on competence.”
Earlier, he said of the Lord Advocate’s argument: “Unless you can find a clear distinction and cut-off point… it does risk, as it were, dragging the court into the political process. Which the structures of the Act are assiduous to avoid, because all of the democratic processes have already happened.”
The hearing will conclude today after which the panel of judges will retire to consider its ruling. Lord Reed yesterday warned it could be "some months" before a final verdict is issued. Nicola Sturgeon has vowed to respect the outcome of the case regardless of its ruling.
The First Minister has previously said she would turn the next general election into a "de facto" referendum if the Supreme Court ruled against her government.
To sign up to the Daily Record Politics newsletter, click here.