The judge who heard the courtroom battle over Holyrood’s gender reforms expects to take “some time” to give her decision in a “unique, very interesting and challenging case”.

Lady Haldane retired to consider the evidence and write her opinion this afternoon after the judicial review at the Court of Session concluded a day earlier than timetabled.

The Scottish Government is seeking to overturn a veto of Holyrood’s Gender Recognition Reform (Scotland) Bill, which was imposed by Scottish Secretary Alister Jack. 

The GRR Bill is intended to make it quicker and simpler for trans people to change their legal sex by obtaining a gender recognition certificate (GRC). 

MSPs passed the legislation 86 to 39 in December, but Mr Jack stopped it becoming law the following month by making the first ever order under Section 35 of the Scotland Act.

Although both Edinburgh and London agree the Bill is within Holyrood’s powers, Mr Jack said it would nevertheless adversely affect the operation of UK-wide equality law.

On Tuesday, Scotland’s top law officer, the Lord Advocate Dorothy Bain KC, argued the veto was based on an error in law, and the justification for it irrational and inadequate.

She argued Mr Jack’s motivation was a “policy disagreement”, not a legal concern.

She said he had failed to meet all three conditions for a valid Section 35 order - that the GRR Bill modified reserved law, having reasonable grounds for believing it would have an adverse effect on the operation on reserved law, and giving reasons for the order.

Responding for the UK Government today, David Johnston KC said Ms Bain’s reference to a policy disagreement was a “red herring”.

He said: “The reference to a veto on grounds of a policy disagreement is a red herring. 

“The sole question is whether the Section 35 preconditions are met and whether the discretion was rationally exercised. 

“Whether there is or whether there might be a policy disagreement is simply irrelevant.”

Mr Jack had made a “good faith attempt to make a decision”, he said.

Mr Johnson said the order was in “no way unconstitutional” but part of the Scotland Act.

As to Ms Bain's claim it was an "unfettered" power, "nothing could be further from the truth".

Mr Johnston argued the court should only intervene if it was satisfied that "no reasonable Secretary of State” could have made the decision which Mr Jack did.

He said the order was justified because the GRR Bill did modify UK-wide gender law “in substance”, as more people and a “different cohort” could get Scottish GRCs under it.

The Lord Advocate's claim the GRR Bill did not modify the operation of this reserved law - and was therefore invalid - relied upon an "excessively formalistic" view, he said.

On Tuesday, Ms Bain argued Mr Jack failed to inform himself adequately before making the order by drawing on scant, irrelevant and biased material, making his decision invalid.

Mr Johnston said her criticism of his reasons was “simply off the mark", and that the Scottish Government had not identified anything in the reasons it couldn’t understand.

He said Mr Jack had taken advice from the Cabinet Office's Equality Hub and the Equality and Human Rights Commission and other sources, and making the order was "within the range of reasonable decisions" open to him.

He gave short shrift to the Lord Advocate's claim that Mr Jack had failed to take into account the experience of other countries with self-ID schemes, including the USA and Canada.

He said the evidence base was thin, there was no standard form of self-ID, and no relevant country had constitutional arrangements akin to that of the UK and Scotland.

Any comparisons were of "very limited assistance" to Mr Jack and the court, he said.

He also denied Mr Jack’s reasoning about adverse effects had been “hypothetical and speculative”, although he had used “predictive judgment” given the future was concerned.

Lady Haldane is expected to take several weeks or even months to produce her option, which could ultimately be appealed to the UK Supreme Court. 

Closing, she warned that a second connected case, which is due to go to an appeal hearing next month, could bring the parties back to court for fresh submissions.

The appeal by the For Women Scotland group is against the Scottish Government’s definition of “woman”, which was relied on by both sides in the GRR case.

Lady Haldane offered to delay her opinion until the appeal was settled, but both the UK and Scottish governments urged her to proceed and deal with any consequences later.

Agreeing to push on, she said: “We’ll cross that bridge when we come to it.”