“This is a dark day for devolution”, declared SNP leader Humza Yousaf, after an unprecedented legal battle between Westminster and Holyrood came to a head today, with judges ruling that the UK government acted lawfully in blocking Scotland’s attempts to make it simpler for trans people to change their legal sex.

The first minister mounted the legal challenge after Westminster vetoed Scotland’s Gender Recognition Reform Bill under never-before-used legal powers. Today, Scotland’s supreme civil court rejected Yousaf’s case, saying the UK government has the power to prevent it becoming law under Section 35 of the Scotland Act – the 1998 act which created a devolved parliament in the first place.

The bill, introduced under Nicola Sturgeon, would have removed the need for trans people to be diagnosed with gender dysphoria by a doctor before they are allowed to change their legally-recognised sex. It would also have lowered the age that someone can apply for a gender recognition certificate from 18 to 16.