Humza Yousaf is facing a high-profile clash with his Green partners in government after suffering an emphatic court defeat over Holyrood gender reforms.

The Greens urged the First Minister to appeal against the ruling, but many SNP MSPs and MPs want him to accept it and move on, especially with a general election approaching.

Pete Wishart, the SNP’s longest serving MP, said he didn’t see "any point” in an appeal and said his party should use the case to attack the Tories and focus on winning votes instead.

The Perthshire MP told The Herald: “I can’t just see the point of it. It just saps the energy. It’s an issue that not everyone in our movement is reconciled with.

“It’s a time maybe to start with the things that are important, and the important thing is winning this election, campaigning hard on a cost-of-living crisis, and looking at what the Tories are doing with their constitutional agenda of constraining our parliament.”

One SNP MSP said it would be “utter madness” to continue the legal fight, which has already cost Scottish taxpayers around £230,000, in the midst of acute buget pressures.

They said no sensible SNP politician would want to defend a plan that “had alienated lots of women” on the doorstep, and it would be better for the UK and Scottish Governments to find a joint solution on gender reform.

Opposition parties also urged Mr Yousaf, whose government has 21 days to appeal, to abandon the case because of the impact on the public purse. 

If there is an appeal, the case would go next to the Inner House of the Court of Session and then potentially to the UK Supreme Court, adding substantially to costs.

Judge Lady Haldane yesterday issued a 65-page ruling that the UK Government’s unprecedented veto of Holyrood gender legislation had been lawful.

MSPs passed the Gender Recognition Reform Bill (GRR) in December last year by 86 votes to 39 on a cross-party basis.

Its aim was to speed up and simplify the process for a trans person to change their legal sex in Scotland by obtaining a gender recognition certificate.

Under the current UK-wide system dating from 2004, this takes at least two years, involves a medical diagnosis and is only available at 18.

Holyrood’s GRR Bill cut the waiting time to six months, replaced medical diagnosis with self-declaration (self-ID) and lowered the age threshold to 16.

However, before it could become law, Scottish Secretary Alister Jack blocked it by using the first ever order under Section 35 of the 1998 Scotland Act that delivered devolution.

He argued that although the subject matter was within Holyrood’s powers, the Bill would have an adverse effect on the operation of UK-wide equality law.

Running for the SNP leadership in the spring, Mr Yousaf said he would challenge the veto as a matter of principle if he won and later launched a judicial review.

He said over the summer that such a veto denied Scotland “true self-government”.

He said: “It’s not actually about the legislation itself. It’s the principle. If the parliament passes by a majority a piece of legislation, why can another government come in and veto that legislaion?”

His top law officer, the Lord Advocate Dorothy Bain KC, argued at the Court of Session in September that Mr Jack’s decision had been unlawful, irrational and motivated by a “policy disagreement” with Edinburgh rather than legal concerns.

The UK Government argued Mr Jack acted in good faith after informing himself on the issue.

Lady Haldane comprehensively rejected the Scottish Government’s arguments and said there was nothing to lead her to conclude that Mr Jack had acted unreasonably or unlawfully.

She also said Section 35 was an “intrinsic part” of devolution, not a perversion of it.

Responding on Twitter/X, the First Minister said it was a “dark day for devolution”.

He said: “Today's judgment confirms beyond doubt that devolution is fundamentally flawed. 

“The Court has confirmed that legislation passed by a majority in Holyrood can be struck down by Westminster.

“The only way to guarantee we get true self-government is through independence.

“We, of course, respect the Court's judgment and will take time to consider its findings."

Mr Yousaf did not commit himself to an appeal as he knows many of his own MPs and MSPs - and most Scots, according to polls - oppose parts of the Bill and want it to remain frozen.

But the Greens have long championed gender reform and ensured the GRR Bill was in the Bute House joint government deal, creating a likely flashpoint if the Bill is ditched. 

Green MSP Maggie Chapman said: "I hope the Scottish Government will consider all options for appeal. It is a democratic outrage, crushing basic rights and equality. 

“It shows the huge limitations and constraints on devolution and confirms that the UK Government refuses to see our trans siblings for the people they really are.”

Mr Jack said: "I was clear that this legislation would have had adverse effects on the operation of the law as it applies to reserved matters, including on important Great Britain-wide equality protections.

"Scottish Government ministers need to stop wasting taxpayers' money pursuing needless legal action and focus on the real issues which matter to people in Scotland."

Labour's shadow Scottish secretary Ian Murray said it was "disappointing this legalisation ended in the courts but this ruling should be respected".

Alba MSP Ash Regan, who quit as an SNP minister over the GRR last year, urged Mr Yousaf to scrap the gender reforms.

She said: “The Scottish Government lost the battle in court and they will further lose the support of the people of Scotland if they keep pursuing this policy. 

Colin Macfarlane, of the LGBTQ+ charity Stonewall, said: “This unfortunately means more uncertainty for trans people in Scotland, who will now be waiting once again, to see whether they will be able to have their gender legally recognised through a process that is in line with Ireland, Canada and New Zealand.”