IT turns out that Britain’s best-loved fiction writer also knows a thing or two about facts.

Yesterday, Harry Potter author JK Rowling lent her support to Maya Forstater, a tax expert who lost her job at a think tank for questioning the idea that it is possible to change sex.

Rowling’s tweet, sent from her account with 14 million followers, read: “Dress however you please. Call yourself whatever you like. Sleep with any consenting adult who’ll have you, Live your best life in peace and security. But force women out of their jobs for stating that sex is real?” Rowling added the hashtags “IStandWithMaya” and “ThisIsNotADrill.”

The response has been planned book burnings, public denouncements and death threats; her relatively anodyne statement has sent social justice warriors into a meltdown.

But the reality is Rowling is right, there is no spell that can transform men into women and incanting the magic words “transwomen are women” and doesn’t make it so.

The level of rage directed at Rowling suggests that deep down her critics know this too. Like Harry Potter’s nemesis Voldemort, once this truth is named it becomes more powerful.

While the reaction on Twitter is disturbing, the legal case that prompted it is a serious threat to freedom of expression.

Forstater is a feminist with a long history of campaigning against sexist stereotypes. Last year the government held a consultation on reform of the Gender Recognition Act and Forstater engaged in discussion of the issues on Twitter.

The tweet which led to Forstater losing her job was: “What I am so surprised at is that smart people who I admire, who are absolutely pro-science in other areas, and who champion human rights and women’s rights are are tying themselves in knots to avoid saying the truth that men cannot change into women (because that might hurt men’s feelings).”

Essentially Forstater was telling the truth, that just because some people desperately want to change sex there is no “innate” male or femaleness that exists outside the material reality of our bodies.

This might be an unpopular fact in the post-truth era, but nonetheless, it’s as clear as the cock on the Cerne Abbas giant.

In his ruling Judge James Tayler said that Forstater “will not accept in any circumstances that a trans woman is in reality a woman,” which she believed was important to “support her sense of self, her feminism and political activism.”

According to Justice Tayler, holding that humans are sexually dimorphic is “incompatible with human dignity and fundamental rights of others.”

This will have serious ramifications for freedom of speech, though the outcome should not be a surprise. Transgender advocacy groups like Press For Change, GIRES and Stonewall have delivered training and advice to the judiciary for some years.

The Equal Treatment Bench Book (2013) explicitly references both GIRES and Press for Change, advising that “there is no requirement for a trans person to have undergone any medical treatment to be covered by the protected characteristic of gender reassignment, nor does trans person have to be proposing to undergo, be undergoing or have undergone any process of physiological change.” As such, part-time cross-dresser and transvestites are entitled to claim to be transgender.

The fact that a court case needed to be held to establish something that has been known since the dawn of humanity, that there are two sexes, is a testament to the capture of government and statutory bodies by those promoting extremist and unscientific transgender ideology.

On a personal level, I know that my outspoken views on gender have impacted on my career, and I am effectively barred from employment in many sectors.

I am not alone. Somewhat naively I keep expecting a grown-up with authority to take a stand and call out the Emperor as not just naked, but as a predatory flasher.

The failing is not of one judge nor one company. It is a failing of our political class. Those we elect to represent us have consistently put their public image above their public duty, siding with lobby groups like Stonewall, GIRES and Press for Change because they thought that was the woke line to take.

That JK Rowling has spoken up is great, but cushioned by wealth and fame, the risk to her is low.

This is a time when we need our political leaders to speak out, to protect the rights of all of us to speak the truth.

Magical thinking should have no place in law.