BACK in December 2022, the vote for Gender Recognition Reform was one of the proudest moments of our Scottish Parliament. It followed three long days of debate - and many months of discussion - that brought out the best and the worst in our politics.

Despite the long and late nights, and all of the lies, the smears and the prejudice that had been on display over the weeks leading up to it, a significant majority of our Chamber voted to support this small but important change. 

There were powerful speeches from all benches and cheers from the public gallery as the vote was finalised. It was a moment that meant so much to the many LGBTQIA+ people who had seen their rights talked about, debated and demeaned over months and years, often without the chance to be heard themselves.

The National: Scotland's GRR reforms are set for the final stage next week

After all of the of scrutiny and consultation, it was an all too rare but important step forward against a tidal wave of misinformation and a reactionary culture war that has treated trans rights and lives as political pawns.

But the celebrations didn’t last. The vote was gleefully ignored by a UK government that is not only opposed to trans rights but is actively trying to roll them back.

Now, rather than enjoying the basic rights that MSPs from all parties supported, many of the trans people and allies who had been cheering that day from the public gallery will be anxiously watching court streams and following from afar while their rights are poured over by lawyers.

It should never have ended up like this. It was a simple piece of legislation that was based on international good practice and similar to changes already enacted in Ireland and many other countries around the world.

READ MORE: UN expert hails Scotland's gender recognition reform plans

Despite all of the moral panic and smears, it has only ever been about allowing trans people to live in dignity and allowing them to be recognised as the people that they are and always have been. It is an important right, and one that many of us take for granted every day.

The vast majority of us will never have to go through bureaucratic hurdles or invasive processes to get that recognition. Neither will we have to worry about what name or gender will be on our marriage or death certificates or having to ‘out’ ourselves time and again. Trans people should not be forced to do these things either.

The decision to veto our Parliament with a Section 35 order may have been unprecedented, but it was also opportunistic. It followed a ruthless and cynical campaign of misinformation, much of which began in Downing Street.

The National: Prime Minister Rishi Sunak speaks to the media

Gender reform, like trans healthcare and banning conversion practices, has been jumped on by reactionary culture warriors and Tory politicians who saw a chance to make political capital out of further punishing, smearing and scapegoating a marginalised minority.

The veto only added to an atmosphere of prejudice and hostility that is all too evident in the shocking hate crimes data. For every person who has been attacked, spat at or abused for who they are, this was yet another slap in the face.

Whatever decision the court reaches it will set an important precedent. It will tell us to what extent we live in any kind of democracy. If Westminster can successfully veto simple and clearly devolved equality legislation then they will do the same in other areas.

READ MORE: Legal battle over gender reform legislation ‘could last until 2024’

I know that the days ahead will be difficult. My heart and my solidarity will be with my trans siblings, who I know will be anxious and hurting. It has been a long, hard and often painful road for so many. And some are no longer here to witness this week. I hope that we are able to celebrate again soon, and that the changes our Parliament voted for are delivered. 

Prejudice ruins lives. For generations, so many have been unable to live the lives they wanted to and deserved to. We may not be able to undo all of the pain and the injustice that so many have endured and suffered, but we can build a better tomorrow and a better and more inclusive country where everyone is able to be themselves. 

What happens in the Court of Session over the days ahead could be a crucial step on that journey.