In a landmark ruling a UK judge has said it is legal to fire employees for saying that transgender women are not real women.

Tax expert Maya Forstater was sacked from the Centre for Global Development (CGD) in March 2019 for using what they called "offensive and exclusionary" language.

She had written social media posts questioning the process of gender transition, with messages like: "men cannot change into women."

She sued the CGD for discrimination under the UK's 2010 Equality Act, which bars employers from punishing staff for their beliefs.

However, Judge James Tayler said on Wednesday that Forstater's views are not covered by the law, and are "not worthy of respect in a democratic society."

Visit Insider's homepage for more stories.

A judge in the UK ruled on Wednesday that it was legal for a leading think tank to fire a worker for arguing publicly that transgender women are not real women.

The Centre for Global Development (CGD) sacked tax expert Maya Forstater in March 2019 over a series of tweets in which she supported the notion that "men cannot change into women."

She sued the CGD on grounds of discrimination, but her argument was rejected by a judge, who said her position on the issue is "not worthy of respect" and does not enjoy legal protection.

Forstater sued the CGD for discrimination in March 2019, citing the UK's 2010 Equality Act, which she said made it a crime to fire her for her views on gender transition.

In a ruling published Wednesday, employment tribunal Judge James Tayler said Forstater's view is "not a philosophical belief protected by the Equality Act" and "is not worthy of respect in a democratic society."

The trans flag waved at London Pride. Ink Drop/Shutterstock

He continued by saying that Forstater "is absolutist in her view of sex and it is a core component of her belief that she will refer to a person by the sex she considered appropriate even if it violates their dignity and/or creates an intimidating, hostile, degrading, humiliating or offensive environment."

It is believed to be the first case of its kind in the UK.

The 45-year-old had routinely said on Twitter and the blogging site Medium that there are only two biological genders, male and female.

"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," Forstater tweeted on September 2, 2018.

In a separate tweet on September 25, 2018, Forstater said: "Yes I think that male people are not women. I don't think being a woman/female is a matter of identity or womanly feelings. It is biology."

In October 2018, colleagues at CGD confronted Forstater about her tweets, "alleging that they were 'transphobic'," Tayler's judgment said.

A sign at London Pride. Mark Makela/Getty Images

After the backlash, Forstater set up a separate Twitter account called @2010Equality to tweet from.

Before her dismissal Forstater was accused by her managers of using "offensive and exclusionary" language and "fear-mongering," the Times of London reported.

In her witness statement, Forstater said that sex is "a material reality which should not be conflated with 'gender' or 'gender identity'."

"Being male or female is an immutable biological fact, not a feeling or an identity," she wrote.

The Central London Employment Tribunal. Google Maps

In the wake of Wednesday's ruling, Forstater posted several tweets expressing her "shock and disbelief."

"My belief as i set out in my witness statement is that sex is a biological fact & is immutable. 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."

"Everyone should be free to express themselves, to break free of gender stereotypes and to live free of violence, harassment and discrimination.

"But this does not require removing people's freedom to speak about objective reality, or to discuss proposed changes to law and to government policies clearly."

Forstater said she is now deciding whether to appeal the ruling.

Forstater's lawyer Peter Daly told the Guardian: "Had our client been successful, she would have established in law protection for people – on any side of this debate – to express their beliefs without fear of being discriminated against."

During her challenge, Forstater was supported by the Index on Censorship advocacy group.

"I cannot see that Maya has done anything wrong other than express an opinion that many feminists share – that there should be a public and open debate about the distinction between sex and gender," CEO Jodie Ginsberg told the Guardian.

As of December 18, Forstater had crowdfunded £83,000 ($109,000) to cover her legal expenses via the CrowdJustice platform.