The decision represents a victory for the Scottish Government, who were being challenged over the definition by the For Women Scotland campaign group.
Last year, they challenged ministers over legislation designed to increase the number of women on public boards.
Initially, the law stated that anyone “living as a woman” would be eligible.
The group’s first action was successful, forcing the publication of new statutory guidelines which stated that transgender women should still be counted as female, so long as they held a GRC.
For Women Scotland then claimed the Scottish Government had overstepped its powers by effectively redefining the meaning of gender, to include people born men.
However, Lady Haldane disagreed.
Her judgment last December stated that sex was “not limited to biological or birth sex, but includes those in possession of a GRC obtained in accordance with the 2004 [Gender Recognition] Act stating their acquired gender, and thus their sex”.
In their argument, For Women Scotland’s lawyer, Aidan O’Neill KC said the law was now “utterly unworkable” as it effectively confuses two separate and distinct protected characteristics, sex and gender reassignment.
He told the court this would give rise to “an unworkable minefield, an ambulance chasers’ dream”, and ultimately lead to men having more rights than women.
The case was heard by Scotland’s second highest-ranking judge, the Lord Justice Clerk Lady Dorrian, and Lord Malcolm and Lord Pentland.
In their ruling, they said this was an area “on which individuals and organisations hold firm, even entrenched views, where there is intense public debate”.
However, they made clear that the issue facing the court was “not one of policy, rather it is one of statutory construction.
“It is important that in doing so the court should confine itself to determining the issue before it, and not seek to address wider issues of policy or social engineering.”
Policy, the court said, was “best addressed by parliaments”.
In their conclusion, they claimed a person with a GRC would have both the protected characteristics of gender reassignment and sex.
“A person with a GRC in the female gender comes within the definition of ‘woman’ for the purposes of section 11 of the Equality Act, and the guidance issued [by the Scottish Government] in respect of the 2018 Act [ Gender Representation on Public Boards (Scotland)] is lawful.”
For Women Scotland said: “Naturally, we are hugely disappointed in today’s judgment, which has ruled that women’s protections under law may – in some cases – include men who have obtained a GRC.
“We are obviously still analysing the decision and will be speaking to our legal team in due course to consider the possibility of a further challenge.”
Sex Matters, who were granted leave to intervene in the case, said the ruling was “an important step towards forcing more clarity on how the law defines the words ‘male’ and ‘female’ and ‘man’ and ‘woman’ in different contexts”.
However, they said the judgment left “many issues unresolved, such as issues around freedom of association in single-sex associations, and the assertion that discrimination in relation to pregnancy, maternity and breastfeeding is not a form of sex discrimination.”
Sex Matters called on the UK government to resolve these issues by “using secondary legislation to clarify the meaning of sex in the Equality Act”.
The ruling was welcomed by Green MSP, Maggie Chapman.
“This is a very welcome ruling and an important day for trans rights,” she said.
“Trans women are women, and have been subjected to some of the most appalling bigotry and prejudice as part of a culture war that has been knowingly and purposefully stoked by some politicians and media.
“With anti-trans hate crimes soaring and the UK government actively rolling back rights and using an anti-democratic veto against the gender reform that our Parliament overwhelmingly voted for, a lot of trans people are feeling attacked like never before.
“The Scottish Greens stand fully and unreservedly with our trans siblings and always will.”
Although not directly related, the case could have had a bearing on the Scottish Government’s challenge to Westminster’s veto of Holyrood’s recent Gender Recognition Reform Bill.
Scottish Secretary Alister Jack blocked the Bill from becoming law by issuing the first-ever order under Section 35 of the Scotland Act 1998.
At the Court of Session in September, both the UK and Scottish Governments made arguments predicated on Lady Haldane’s ruling in the For Women Scotland case being correct.
Dr Michael Foran, a lecturer in public law at the University of Glasgow suggested the ruling could help the UK Government’s case.
Writing on X, the site formerly known as Twitter, he said he believed the ruling would mean that the Gender Recognition Reform Bill “would change the operation of the Equality Act and so would modify the law as it applied to reserved matters”.
He added: “If sex in the Equality Act is taken to mean biological sex unless modified by a GRC, then changing the process by which you can get a GRC modifies the operation of provisions relating to sex in the Equality Act.
“An analogy here would be if there was U.K. legislation that gave welfare benefits or social care to people who meet certain criteria and Scotland introduced legislation changing the criteria for qualifying for these benefits. That would modify the operation of the benefit scheme.
“This wasn’t expressly stated in this judgment because it wasn’t the legal question at issue but this decision means that one potential hurdle in the s35 judicial review has been avoided.
“If the court here had held that sex isn’t modified by a GRC the s35 case would have been more complex.”