IT wasn’t easy getting to this point. There was frustration and anger on both sides. The Scottish Government said it was vital to reform the often difficult and stressful system people face to legally change their gender. Critics said women’s rights, and safety, were at risk. But after protests at Holyrood, arguments and accusations online, and criticism that sometimes turned ugly, it happened: the Scottish Parliament passed the Gender Recognition Reform Bill.

This wasn’t the end of the story of course. After the bill was passed, the UK government said this week that they would be using a Section 35 order to prevent the Gender Reform Bill from gaining royal assent.

Announcing the move, the Scottish Secretary Alister Jack said UK ministers had taken the decision because the changes to the law in Scotland would impact on equality laws across Britain. Not only might the reforms have an adverse impact on single-sex clubs and associations and equal pay, said Mr Jack, having different processes across the UK could lead to more fraudulent applications.

What this means, almost inevitably, is that we are into the realm of another constitutional and political crisis that will be resolved in the courts rather than parliament.

The First Minister Nicola Sturgeon has already indicated her government is likely to seek a judicial review of Mr Jack’s decision at the Court of Session. She also accused the UK government of trying to stir up a culture war and becoming increasing hostile to Holyrood. “This is not the first attack on the Scottish Parliament we’ve seen,” she said, “but it is the most serious to date.”

HeraldScotland: Alister JackAlister Jack (Image: free)

Historically, what Ms Sturgeon says about the seriousness of the UK Government’s decision is certainly true: in the history of devolution, this is the first time a Section 35 order has been used in this way.

It was always a part of the Scotland Act, and always provided for a UK secretary of state to stop a bill if they had reasonable grounds for believing the law would have an adverse effect on laws reserved to Westminster. But there’s a reason some people call it the “nuclear option”: no one seriously expected the UK Government to ever press the button.

Now it’s happened, the potential consequences for the politics and constitution of Britain are profound, not to mention the uncertainty for trans people, although it should be remembered exactly how we got here.

From the start, many people had concerns about certain aspects of the bill, particularly the provision that would lower the age people can apply for a gender recognition certificate from 18 to 16. Others said the bill had insufficient controls to prevent convicted sex offenders from exploiting the legislation by changing their gender to gain access to women and girls.

However, throughout the process, there has been a robust debate about the proposals, and their possible effects. There was not one but two public consultations. The bill also had the support of four of the five Holyrood parties, it was debated at length and, after the debates were finished, passed overwhelmingly by the Scottish Parliament. This is, in other words, a law that has been six years in the making.

The passing of the gender bill is also devolution in action. Even before the re-establishment of the Scottish Parliament in 1998, Scotland had different legal, religious and education systems that co-existed with their counterparts in the rest of the UK.

Since then, Scottish governance and law has diverged on other matters, on student tuition fees, for example, the public smoking ban and the minimum pricing of alcohol, often for the rest of the UK to follow. It has meant that different rules can apply in different parts of the UK and its citizens have come to understand that. And besides, if there was never any difference or divergence, what would be the point of devolution?

The UK Government’s argument in the case of the gender law is that it’s in a different category. Mr Jack suggests for example that if someone is legally one gender in Scotland and another in the rest of the UK, there could be difficulties over the administration of benefits as well as a risk of fraud. But the risk of administrative issues must be balanced against the potentially positive effects for members of the trans community who can more easily gain a gender recognition certificate.

It should also be remembered – and this has sometimes been forgotten in the furore – that the situation affects a very small number of people, perhaps only a couple of hundred a year, in which case any administrative difficulties should not be insurmountable.

Whatever the UK Government says about its concern for the administration of benefits, there must also be a suspicion that it’s taken the action it has for reasons other than those it has publicly stated.

Does it, for example, want to show the Scottish Parliament who’s boss? Do Tory ministers also actively want the culture war that the First Minister warned about?

Perhaps they think that, given the fact there are strong critics of the legislation in Scotland, stirring the pot could be electorally good for the Tories and bad for the SNP? If so, using Section 35 to achieve those aims is an irresponsible way to conduct British politics.

Unionist parties should also be worried about where we go from here. The last time the UK and Scottish governments were in court, over a second referendum, the UK Government won in the law court but appeared to lose the battle of public affairs: in the wake of the court’s ruling, there was a spike in support for independence.

The latest polling appears to suggest this may have fallen back again, but the unionist parties should be aware of the political and constitutional risks of going back to the courts over the gender reforms. And the trend towards conducting politics in court rooms rather than parliamentary chambers is worrying for anyone who is concerned about the health of our democratic system.

The tussle over the gender law has also created particular problems for the Scottish Labour leader Anas Sarwar. Mr Sarwar whipped his MSPs to support the bill, but when the UK leader Keir Starmer said that 16-year-olds should not legally be able to change gender, as the Scottish bill says they can, Mr Sarwar continued to insist that there was no disagreement within the party.

However, it raised the suspicion that the Scottish leader was being brought back into line by his UK “boss” and is unlikely to do much to refute the “branch office” accusations Scottish Labour so often faces.

Perhaps, in time, the two Labour leaders will be able to unravel this Gordian knot of apparently completely agreeing over an issue on which they disagree. But the bigger and more important issue is the possible effects of the governmental fall-out on the rest of us.

It seems taxpayers must now sit and watch their money being spent on an expensive court action over a legitimate bill passed in a democratically elected parliament. It is a battle that, in the end, the Scottish Government may lose – in fact, it seems likely. But the UK Government faces a potentially much bigger loss, which is defeat in the court of public opinion, with serious consequences for trans people, for politics, and for the future of devolution.