LONDON (Reuters) - As a Halloween treat for her fans, J.K. Rowling has revealed that the much-hated character Dolores Umbridge from her "Harry Potter" stories is based on a teacher to whom she took an instant dislike - but whose name she has not disclosed.

Umbridge, played by actress Imelda Staunton in the film adaptations of the hugely popular fantasy series, is the seemingly sweet but innately vicious teacher at Hogwarts who bans young Harry from playing Quidditch and forces him to write the words "I must not tell lies" on the back of his hand.

In an essay posted on Friday on her Pottermore.com website, Rowling says that the character of Umbridge was based on a person "whom I disliked intensely on sight".

"The woman in question returned my antipathy with interest. Why we took against each other so instantly, heartily and (on my side, at least) irrationally, I honestly cannot say," she writes.

Like Umbridge, the person had a "pronounced taste for twee accessories...(including) a tiny little plastic bow slide, pale lemon in color".

Elsewhere, without revealing the person's name, she describes her as someone who had been her teacher "long ago...in a certain skill or subject".

"Dolores...is one of the characters for whom I feel the purest dislike," Rowling writes in the essay's conclusion.

"Her desire to control, to punish, and to inflict pain, all in the name of law and order, are, I think, every bit as reprehensible as Lord Voldemort’s unvarnished espousal of evil,” she adds, referring to Harry Potter's arch enemy.

Rowling posted the essay and other new writing on Pottermore at Halloween in conjunction with the launch of "Harry Potter and the Order of the Phoenix", the fifth novel in the series, on the website.