"Harry Potter" author J.K. Rowling has come under fire in recent years for alleged transphobia after defending biological women in the wake of increased pushes to consider transgender women the same.

"I don’t like the way she’s been treated, actually. I think she’s entitled to her opinion, she’s entitled to say what she feels," he said during an appearance on "Sunday With Laura Kuenssberg" on BBC News.

"As a woman, she’s very much entitled to say what she feels about her own body. There’s nobody better to say that, as a woman. So, I do feel that people have been a bit high and mighty about their own attitude toward J.K. Rowling, quite frankly," he added.

The Scottish actor's comments follow Kuenssberg's question about identity and coincide longstanding outrage over Rowling's belief in biological sex that some have labeled as "transphobic."

'HARRY POTTER' AUTHOR J.K. ROWLING ROASTED FOR SUPPORTING RESEARCHER WHO DEFENDED BIOLOGICAL SEX RECOGNITION

Scottish actor Brian Cox

Brian Cox attends the 74th annual Directors Guild of America awards in Beverly Hills, California. Cox has rushed to the defense of "Harry Potter" author J.K. Rowling for her opinions on biological sex and gender. (Lisa O'Connor/AFP via Getty Images)

Cox also voiced support for the feminist author's comments on "Piers Morgan Uncensored," where he spoke out against cancel culture as "form of modern day McCarthyism" and discussed the J.K. Rowling controversy by calling outrage against her "deeply unjust."

The feminist author caught flak for a number of 2020 tweets voicing her opinion on the issue.

"If sex isn’t real, there’s no same-sex attraction. 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," she wrote in one tweet from June 6, 2020.

‘SO BLOODY ANGRY’: J.K. ROWLING CRITICIZES GENDER-FOCUSED ‘POLICIES THAT ENDANGER EXTREMELY VULNERABLE GIRLS’

JK Rowling at a premiere

"Harry Potter" author J.K. Rowling has faced criticism for her opinions upholding biological women in recent years. (Dia Dipasupil)

She continued in the thread: "The idea that women like me, who’ve been empathetic to trans people for decades, feeling kinship because they’re vulnerable in the same way as women - ie, to male violence - ‘hate’ trans people because they think sex is real and has lived consequences - is a nonsense."

The "Harry Potter" author spoke out on the issue multiple times, leading the cancel culture mob to blacklist her and depict her as a villain.

One BuzzFeed list from August 2022 placed Rowling among 17 famous people who began as heroes but ended up as "major villains" 

BUZZFEED PIECE RANKS J.K. ROWLING AMONG ‘MAJOR VILLAINS’ LIKE O.J. SIMPSON, JIM JONES, BENEDICT ARNOLD

Decapitate TERFs sign

Members of Parliament stood in front of a sign reading "Decapitate TERFs" at a trans rights demonstration. (Twitter)

"J.K. Rowling went from beloved children's author to a TERF [trans-exclusionary radical feminist] after making a number of anti-trans comments, then repeatedly doubling down on them," author Hannah Marder wrote.

Rowling also lashed out at Scottish National Party Members of Parliament for a Saturday tweet showcasing multiple members holding signs reading "I eat TERFS" and "decaptitate TERFS." 

"A few of Scotland's wonderfully progressive and kind politicians, posing proudly in front of banners calling for women to be decapitated and eaten," Rowling tweeted, condeming the messages.

CLICK TO GET THE FOX NEWS APP

Fox News' Sam Dorman, Brian Flood and Audrey Conklin contributed to this report.