J.K. Rowling is speaking out after being roundly criticized for recent comments about trans people.

In a lengthy essay posted on her personal website, the Harry Potter author defended her recent tweets denigrating the trans community.

RELATED: Daniel Radcliffe, Eddie Redmayne & More Put J.K. Rowling On Blast After Tweet About Trans People

Rowling, in the essay, explained how she came to be interested in trans issues, and then discussed for the first time her “first violent marriage,” and revealed that she is “a domestic abuse and sexual assault survivor.”

“I’m mentioning these things now not in an attempt to garner sympathy, but out of solidarity with the huge numbers of women who have histories like mine, who’ve been slurred as bigots for having concerns around single-sex spaces,” she wrote in the essay.

“So I want trans women to be safe. At the same time, I do not want to make natal girls and women less safe,” she said. “When you throw open the doors of bathrooms and changing rooms to any man who believes or feels he’s a woman – and, as I’ve said, gender confirmation certificates may now be granted without any need for surgery or hormones – then you open the door to any and all men who wish to come inside. That is the simple truth.”

Following her initial tweets, Rowling received a lot of backlash, including from “Harry Potter” star Daniel Radcliffe, who said in a statement, “Transgender women are women. Any statement to the contrary erases the identity and dignity of transgender people and goes against all advice given by professional health care associations who have far more expertise on this subject matter than either Jo or I.”

He added, “To all the people who now feel that their experience of the books has been tarnished or diminished, I am deeply sorry for the pain these comments have caused you. I really hope that you don’t entirely lose what was valuable in these stories to you.”

“Fantastic Beasts” star Eddie Redmayne also issued a statement to Variety, saying, “As someone who has worked with both J.K. Rowling and members of the trans community, I wanted to make it absolutely clear where I stand. I disagree with Jo’s comments. Trans women are women, trans men are men and non-binary identities are valid.”

RELATED: J.K. Rowling Comes Under Fire For Stereotypical Character Names In ‘Harry Potter’

On Twitter, Rowling’s essay garnered a lot of pushback, with some accusing the author of using her sexual assault to forward transphobia.