Actor Daniel Radcliffe is speaking out in defense of transgender people after a series of tweets from Harry Potter creator J.K. Rowling was widely criticized as being transphobic.

In a letter posted on the website of the Trevor Project, an organization that provides crisis intervention services for young LGBTQ+ people, Radcliffe wrote that “as a human being, I feel compelled to say something at this moment.

“Transgender women are women,” wrote Radcliffe, who played Harry Potter in the popular movie franchise. “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.”

The letter is a response to recent tweets by Rowling, who wrote, “If sex isn’t real, the lived reality of women globally is erased. I know and love trans people, but erasing the concept of sex removes the ability of many to meaningfully discuss their lives. It isn’t hate to speak the truth.”

Rowling’s tweets drew widespread criticism from people accusing her of being a “TERF,” or “trans-exclusionary radical feminist.” The term refers to people who advocate for the rights of cisgender women but not transgender women.

In his letter, Radcliffe said that he wasn’t engaging in “in-fighting” with Rowling, writing that she “is unquestionably responsible for the course my life has taken,” but he did take the extraordinary step of apologizing for Rowling’s comments.

“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,” he wrote. “I really hope that you don’t entirely lose what was valuable in these stories to you.”

Michael Schaub is a Texas-based journalist and regular contributor to NPR.