Harry Potter author JK Rowling has waded into the Brexit debate, suggesting that “racists and bigots” are directing parts of the Leave campaign.

The self-made multi-millionaire writer, a long-term Remain supporter, laid into both camps in an essay on her personal website, accusing them both of conjuring up “monsters calculated to stir up our deepest fears”.

But the most stinging criticism in the 1,700-word piece was for Brexit supporters.

JK RowlingJK Rowling (Ian West/PA)

She labelled them “mini-Trumps”, a reference to Republican US presidential candidate Donald Trump, who “swear that everything will be glorious as long as we disregard the experts and listen to them”.

Ms Rowling accused Ukip leader Nigel Farage of standing in front of a poster that was “an almost exact duplicate of propaganda used by the Nazis” showing “a tsunami of faceless foreigners heading for our shores, among them rapists and terrorists”.

The writer, 50, said: “It is dishonourable to suggest, as many have, that Leavers are all racists and bigots: They aren’t and it is shameful to suggest that they are.

“Nevertheless, it is equally nonsensical to pretend that racists and bigots aren’t flocking to the ‘Leave’ cause, or that they aren’t, in some instances, directing it.

“For some of us, that fact alone is enough to give us pause. The picture of Nigel Farage standing in front of a poster showing a winding line of Syrian refugees captioned ‘Breaking Point’ is, as countless people have already pointed out, an almost exact duplicate of propaganda used by the Nazis.”

JK Rowling as her alto ego Robert Galbraith as she attends the Theakstons Old Peculier Crime Writing Festival, hosted in HarrogateJK Rowling as her alter ego Robert Galbraith with his second novel (Fenris Oswin/PA)

Tory peer Baroness Warsi on Monday condemned the poster released by Mr Farage hours before MP Jo Cox’s death as “indefensible”.

The Ukip leader later said: “If the timing of her murder and me putting out that poster has upset people, I’m sorry. That certainly wasn’t the intention. The intention was to use that poster for a day to point out that the EU is a failed project in every sense.”

Ms Rowling said Remain has relied on “bleak facts” and “grim prognostications” from world financial experts that had fallen on deaf ears in the wake of the global recession.

She added: “Leaders of both campaigns want us frightened only by monsters of their choosing.”

The cast of Harry Potter - Daniel Radcliffe, Emma Watson and Rupert Grint - and JK RowlingThe cast of Harry Potter – Daniel Radcliffe, Emma Watson and Rupert Grint – and JK Rowling (Ian West/PA)

But she went on to make an emotional plea in favour of the EU, after accusing Leave of branding it “an Orwellian monolith, Big Brotheresque in its desire for control”.

She wrote: “I’m the mongrel product of this European continent and I’m an internationalist. I was raised by a Francophile mother whose family was proud of their part-French heritage.

“My French ancestors lived in the troubled province of Alsace, which spent hundreds of years being alternately annexed by Germany and France. I’ve lived in France and Portugal and I’ve studied French and German.

“I love having these multiple allegiances and cultural associations. They make me stronger, not weaker. I glory in association with the cultures of my fellow Europeans.

“My values are not contained or proscribed by borders. The absence of a visa when I cross the Channel has symbolic value to me. I might not be in my house, but I’m still in my home town.”