JK Rowling has said people who criticise the casting of a black actress as Hermione in the new Harry Potter stage play are "a bunch of racists".
Noma Dumezweni will star as the character from JK's books - who was played by Emma Watson in the films - in Harry Potter And The Cursed Child in the West End.
The author told The Observer that the decision has been criticised by some social media users.
-- Harry Potter Play (@HPPlayLDN) June 1, 2016
"With my experience of social media, I thought that idiots were going to idiot," she said.
"But what can you say? That's the way the world is.
"Noma was chosen because she was the best actress for the job."
JK went on: "I had a bunch of racists telling me that because Hermione 'turned white' - that is, lost colour from her face after a shock - that she must be a white woman, which I have a great deal of difficulty with.
"But I decided not to get too agitated about it and simply state quite firmly that Hermione can be a black woman with my absolute blessing and enthusiasm."
Can't wait to see Noma Dumezweni as Hermione on stage this year. ????????????? #harrypotterandthecursedchild #2016
-- Emma Watson (@EmWatson) January 2, 2016
Based on an original story by JK, the play is set 19 years after the events of Harry Potter And The Deathly Hallows.
It will focus on Harry - now an "overworked employee of the Ministry of Magic, a husband and father of three school-age children" - and his middle child, Albus Severus.
Jamie Parker will play an adult Harry Potter, while Paul Thornley will play Ron Weasley.
-- Harry Potter Play (@HPPlayLDN) May 31, 2016
The show officially opens at the Palace Theatre London in July, with preview performances from June 7.