"Harry Potter" author J.K. Rowling on Friday delivered a passionate takedown of "liberal" men who profess progressive politics yet still call women vile and derogatory names when they disagree with them.

"Just unfollowed a man whom I thought was smart and funny, because he called Theresa May a whore," Rowling tweeted. "If you can't disagree with a woman without reaching for all those filthy old insults, screw you and your politics. I'm sick of ‘liberal' men whose mask slips every time a woman displeases them, who reach immediately for crude and humiliating words associated with femaleness, act like old-school misogynists and then preen themselves as though they've been brave."

Rowling frequently tweets acerbically about President Trump and is a champion for liberal causes, yet her defense of May came after the British prime minister's Conservative Party suffered a major blow losing its majority in the House of Commons.

Rowling ended her tweetstorm with a reference to Pepe, the online mascot of the "alt-right" movement that dishes out vitriolic hate on Twitter, and said "liberal" men who attack women based on their "femaleness" are no better.

"I don't care whether we're talking about Theresa May or Nicola Sturgeon or Kate Hooey or Yvette Cooper or Hillary Clinton: femaleness is not a design flaw. If your immediate response to a woman who displeases you is to call her a synonym for her vulva, or compare her to a prostitute, then drop the pretence and own it: you're not a liberal. You're a few short steps away from some guy hiding behind a cartoon frog."