Just weeks ago, few could have predicted the fiery backlash that J.K. Rowling, author of the bestselling “Harry Potter” series, would receive from her own fans. Yet just before Christmas, that’s exactly what she received.

Why? Because she dared defend a woman who was fired simply for expressing a defense of biological reality.

Rowling’s level-headed take on this topic may come as a surprise to some, given her history of supporting liberal politicians. But just as surprising are the facts that led to Maya Forstater’s firing.

Forstater, 45, was employed as a tax expert at the Center for Global Development, a British think tank. In 2018, her organization fired her after she posted comments on Twitter that criticized the U.K. government’s plans to let people self-identify according to the gender they choose.

She tweeted her agreement with Fair Play for Women, a feminist group that opposes allowing biological men into women’s sports. She said, “I share the concerns of @fairplaywomen that radically expanding the legal definition of ‘women’ so that it can include both males and females makes it a meaningless concept, and will undermine women’s rights & protections for vulnerable women & girls.”

After being fired, she filed a complaint with an employment tribunal and alleged that she was discriminated against on the basis of her beliefs.

She reiterated those beliefs in her witness statement to the tribunal. She said she is “gender critical,” meaning that she believes “‘sex’ is a material reality which should not be conflated with ‘gender’ or ‘gender identity’ and that “being female (or male) is an immutable biological fact, not a feeling or an identity.”

The tribunal rejected her claim. In a lengthy judgment issued on Dec. 18, Judge James Tayler ruled that her view is “not worthy of respect in a democratic society,” calling it “absolutist” and “incompatible with human dignity and fundamental rights of others.”

What’s more, Tayler said Forstater’s views are not protected as a “philosophical belief” under the Equality Act 2010, even though “religion or belief” is one of the nine categories protected in the law. The Equality Act is the basis of anti-discrimination law in Great Britain.

Forstater reacted to the ruling with shock. She said, “I struggle to express the shock and disbelief I feel at reading this judgment, which I think will be shared by the vast majority of people who are familiar with my case.”

She also reiterated her view on Twitter: “There are two sexes. Men are male. Women are female. It is impossible to change sex. These were until very recently understood as basic facts of life.”

While employment tribunals in the U.K. do not carry binding legal precedent, this case is clearly an alarming development, particularly because it shows that U.K. law now supports the firing of people whose speech fails to conform to the latest development in LGBT orthodoxy.

Louise Rea, a senior associate at British law firm Bates Wells who advised the company that fired Forstater, defended the ruling in a rather ominous statement to CNN. She ignored Forstater’s free speech claim because her words supposedly attacked the “dignity” of others:

A number of commentators have viewed this case as being about the claimant’s freedom of speech. Employment Judge Tayler acknowledged that there is nothing to stop the claimant campaigning against the proposed revisions to the Gender Recognition Act or, expressing her opinion that there should be some spaces that are restricted to women assigned female at birth. However, she can do so without insisting on calling transwomen men. It is the fact that her belief necessarily involves violating the dignity of others which means it is not protected under the Equality Act 2010.

This case makes clear what had previously been more ambiguous: British law no longer protects speech that goes against progressive sexual orthodoxy, because said speech now violates a person’s “dignity.”

By that standard, virtually any traditional belief system could be labeled as discriminatory if it can be argued that it offends someone’s dignity.

Rowling is to be applauded for sticking her neck out and speaking her mind in an age when doing so is increasingly costly. She is getting heat from fans as well as elite voices in the media, such as Jackson Bird, who wrote in The New York Times that he was “disappointed” in her.

Thankfully in the U.S., the First Amendment remains strong enough to protect the kind of speech Forstater has been penalized for in the U.K. But if “gender identity” is added as a protected class to federal civil rights law—as House Speaker Nancy Pelosi and the left have pushed for, and passed in the House—our system would move in the same grim direction as the U.K.

Protecting marginalized groups from blatant discrimination is not at issue here. We all agree that is wrong. But penalizing people who believe in only two sexes—as we all did until a few short years ago—is an affront to the most rights of human beings: to have free thoughts, and to be able to speak them.