The Court of Session in Edinburgh ruled that the UK Government acted lawfully when it blocked the gender reforms in Scotland, which the SNP attempted to introduce earlier this year.
The party attempted to challenge the Government's decision to block a law introduced in Scotland earlier this year, which would have made it easier for trans people across the border to change their legal gender.
It would have sped up the process of acquiring a gender recognition certificate (GRC), which is seen as an integral part of trans inclusion.
WATCH: Humza Yousaf lays out his vision for independence
The proposed reforms would remove the requirement for a medical diagnosis of gender dysphoria, allowing people to apply for a GRC as long as they have been living as the gender they identify with for three months. This is a reduction from the current minimum of three years.
A total of 11 European countries have introduced similar reforms.
The plans would have allowed 16 and 17-year-olds to legally change their gender. But people under the age of 18 would have to be living as the gender they identify with for at least six months.
The Government blocked the legislation under Section 35 of the Scotland Act, which allows a UK secretary of state to stop a bill from getting royal assent if they have reasonable grounds to believe the law would have an adverse effect on legislation reserved to Westminster.
Westminster’s decision to block the bill from going for royal assent is the first time Section 35 has been used.
In her ruling published today, Lady Haldane, who presided over the legal challenge, said: “The challenge to the order pronounced under section 35 of the 1998 Act, laid on 17 January 2023, fails.
“In so concluding it is important to recognise the novelty and complexity of the arguments and the sophisticated manner in which those arguments were presented before me and from which I derived considerable assistance.
“I will accordingly sustain the pleas in law for the respondent, repel the pleas in law for the petitioners and dismiss the Petition.”
Scottish Trans said the current UK-wide requirements for applying for a Gender Recognition Certificate are overly laborious.
The organisation said: "The time, evidence, and money required, as well as the emotional toll of potentially having an application rejected, mean that many trans people do not apply – even those who have otherwise 'completed' every other aspect of their transition."
It adds: "This is very frustrating for many trans men and women who find that this slow, bureaucratic process is preventing them from otherwise just getting on with their lives.
"Many trans people know they are trans a long time before they socially, medically, and legally transition, and do not make the choice to do so lightly.
"Requiring at least two years of evidence is then an excessively long and arbitrary amount of time to ensure that someone is certain they want to change their legal sex, especially as they also have to make a statutory declaration as part of the process."
But critics say the law undermines sexual equality and poses a risk to women’s safety.
At the time the legislation was first introduced, Reem Alsalem, United Nations Special Rapporteur on violence against women and girls, warned: “Such proposals would potentially open the door for violent males who identify as men to abuse the process of acquiring a GRC and the rights associated with it.
WATCH: Kemi Badenoch outlines Westminster's position on gender self-identification
"This presents potential risks to the safety of women in all their diversity.
“The Scottish government … does not provide for any safeguarding measures to ensure that the procedure is not, as far as can be reasonably assured, abused by sexual predators and other perpetrators of violence.
"These include access to both single-sex spaces and gender-based spaces.”