JK Rowling has defended a woman who lost her employment tribunal after her opinions on sex were ruled “absolutist”.

The Harry Potter author tweeted in support of Maya Forstater, 45, who was fired from her job at poverty think-tank, Centre for Global Development, over a series of tweets questioning government plans to allow people to self-identify as another gender.

On Wednesday, Ms Forstater took to Twitter to say she was in “shock and disbelief” at the judgement, which was handed down at the Central London Employment Tribunal.

Following her comments, a group of supporters started a hashtag #IStandWithMaya, including Ms Rowling.

Ms Rowling, who has 14.6million followers on the platform, said: “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?”

She also used the hashtag #IStandWithMaya and #Thisisnotadrill.

Since the tweet was posted it has been liked over 10,000 times and gathered supportive comments.

One said: “You are a national treasure and a hero to women. Thank you!”

Another said: “This is your best piece of writing. You absolute star.”

But others have said that Ms Rowling is wrong and should withdraw her support.

One said: “I believe this case is a vitally important landmark. We must treat this in the same way we have treated sexism, racism, homophobia.

“Nobody is suggesting she isn’t allowed her opinion but it’s dangerous language that harms people. She should be held accountable for it.”

Freddy McConnell, who became a voice for the trans community after making his film “Seahorse”, about being a dad who gave birth, said: “It’s a dog whistle, Joanne.”

A parent said: “My daughter, who is trans, is a big fan of yours. It breaks my heart to see you post something indicating that discrimination against her is perfectly fine behaviour for an employee.

“The world’s most credible medical orgs affirm trans people. Please catch up.”

Another person said: I grew up as a trans child reading your books as an escape. I would often pick out names from characters to give to myself, before I ever felt comfortable in who I was.