Bel Powley, one of the actors starring in the new TV adaptation of the Harry Potter franchise, has said that she “strongly disagrees” with JK Rowling’s views on gender.

Rowling, who wrote the original Harry Potter books and who serves as an executive producer on the new HBO series, has been increasingly known for sharing anti-transgender rhetoric on social media.

Powley, who first rose to prominence as the lead in the acclaimed 2015 indie film Diary of a Teenage Girl, is set to play Petunia Dursley, Harry Potter’s aunt, in the series, alongside a cast that includes John Lithgow, Janet McTeer, Paapa Esseidu, and Nick Frost.

In an interview with The Telegraph, Powley was asked if she was worried how her career “might be affected” by the association with Rowling and her views on the transgender community.

“I strongly disagree with JK Rowling’s views on gender,” Powley responded. “I think that the trans community deserve safety and dignity and respect and total acceptance.

“But I love Harry Potter,” she continued. “I grew up with the books. I am from that first generation of readers and, again, I love magic and spookiness.”

Rowling’s financial and creative involvement in the Harry Potter TV show has prompted calls for a boycott from many in the LGBTQ+ community.

The author, who has long denied that her views are “transphobic”, was reported to have donated £70,000 last year to the organisation For Women Scotland, amid a legal battle over the legal status of trans people as applied to the 2010 Equality Act. Following a Supreme Court ruling in the organisation’s favour last year, Rowling shared a picture on social media of herself on a yacht, drinking and smoking a cigar.

Powley is the latest of several Potter cast members to have distanced themselves from Rowling’s opinions in interviews.

Lithgow, who plays the elderly wizard Albus Dumbledore, claimed earlier this year that he found Rowling’s views “ironic and inexplicable”, arguing that her books were “clearly on the side of the angels, against intolerance and bigotry”.

The actor said he had been “urged to walk away” from the project amid the backlash, though he added: “I was not about to do that.”

He told The New Yorker: “The reasons to do it were much, much stronger than the reasons to protest against what Rowling has done and said. I do disagree with much of it, much of it I think has been twisted and misrepresented, and she has doubled down on it at her own cost.”

Nick Frost, who plays the school groundskeeper Hagrid in the series, also spoke about Rowling in June last year, telling The Observer: “She’s allowed her opinion and I’m allowed mine – they just don’t align in any way, shape or form.”

He added that he thought discussion around the controversy “shouldn’t blow over”.

“We shouldn’t just hope it will go away, because it makes it easier. Maybe we should educate ourselves,” he said.

Paapa Essiedu, who will play series antagonist Severus Snape, has also asserted his support for the trans community, putting his name to an a letter calling for industry action on trans rights last April.

Harry Potter is released on HBO later this year.