A last ditch effort to stop Scots from being able to self-identify their gender on this year’s census, regardless of their legal status, has failed. 

Campaign group Fair Play for Women lost its appeal against a decision made by Lord Sandison, who ruled transgender people can give a different answer from the sex on their birth certificate without the need for a gender recognition certificate (GRC). 

The group had taken its case to three civil judges at the Court of Session in a final attempt to quash the decision, but on Thursday the Edinburgh-based court said guidance by the National Records of Scotland was lawful.

The feminist campaign group said it was “surprised and disappointed with the decision” and it would mean that the “census in Scotland in 2022 will not collect clear and reliable data on sex”.

“This is a setback in the fight to protect women and girls. But we have always known it will be a long haul,” a spokeswoman said.

“This is one skirmish in a long fight and we are not deterred. We know public opinion is with us. 

“Our support is growing all the time. We are disappointed but not disheartened.”

Earlier this month Lord Sandison ruled the National Records of Scotland’s guidance that people can self-identify their gender, even if they do not have a GRC, is allowed.

He said an answer provided in “good faith and on reasonable grounds” would not be a false answer.

In his 32-page ruling he said there is “no general rule or principle of law that a question as to a person’s sex may only properly be answered by reference to the sex stated on that person’s birth certificate or GRC”.

Fair Play for Women has said that sex was biological and the law did not permit self-identification of sex. 

The group brought the action after it was announced the sex question in the census would contain guidance saying: “If you are transgender you can be different from what is on your birth certificate. You do not need a gender recognition certificate.”

Vic Valentine, Scottish Trans manager, welcomed the ruling and said: “Scotland’s census is meant to count everyone in Scotland as who they are on Census Day, and the guidance provided reassures trans men and trans women that this is the same for them as it is for everyone else. 

“This is an important decision, clearly stating that all trans men and trans women are able to be counted on the census as who they are, not just those who have changed the sex on their birth certificate.”