I doubt whether they talk much about the King of the Visigoths in Labour Party circles. Or anywhere else, for that matter. Yet it was that long-forgotten ruler of 7th-century Spain who in AD681 proclaimed his "Ervigian Code". Among other laws, that raft of measures enshrined state anti-Semitism. It would set the tone for the exclusion or persecution of Jews in Europe for centuries to come.

Erwig already had plenty of discriminatory statutes on the books. According to historian Jane S Gerber in The Jews of Spain: A History of the Sephardic Experience, they included a stipulation that Jews should "present themselves before priests at church services during all Jewish and Christian festivals and there eat pork and other foods specifically forbidden under Jewish law. The penalty for breaking these macabre pledges included death by burning or stoning." Erwig's new code "added the requirement that all business transactions between Jews and Christians begin with the Lord's Prayer and consumption of a dish of pork".

Eat pig, or die – socially, if not physically. Sounds familiar? It ought to, for anyone who has watched the bizarre and sinister saga of "Bacon Butty Ed" unfold during this year. In May, you may remember, Ed Miliband failed to show sufficient relish and panache when devouring a bacon sandwich during the European elections. Far from setting with the sun as one more scrap of forgettable campaign trivia, the Labour leader's maladroit reaction to a slice of cured pork slathered with ketchup has passed into the kind of political folklore that makes the weather, and may even sway votes.

After Sarniegate, Daniel Johnson – one of the Daily Mail's watchful platoon of Miliband- vilifiers – scoffed at his "desperate attempt to look like a man of the people". Such images, opined the editor of the right-wing magazine Standpoint, "will remain in the public's minds".

Earlier this month, Sky News still continued to run with the "Bacon Butty Ed" tag. That mangled sandwich has morphed into a handy signal of the hapless leader's blundering oddity. Out-of-touch, cack-handed, the imperfectly human Ed tries to act like "one of us". His clumsy aversion to pork products betrays him as an alien, a member of some foreign tribe. Now, exactly why would that be? In today's climate of twitchy populism, a daily newspaper (the Express) can even seize on a MigrationWatch report, as it did yesterday, to brand every child of incomers – like Miliband himself – as a "hidden migrant". Against this inquisitorial background, endless harping on the Labour leader's otherness ceases to look much like a jolly jape.

It may well be that few – or even none – of the mainstream media enemies responsible for the monstering of Miliband have done so out of anti-Semitic motives. Plenty of people of all backgrounds either groan in despair or chortle in delight as he stumbles from one unforced error to another: from overlooking the deficit in his conference speech to his rabbit-in-headlights panic when faced with the flimsiest of on-screen challenges from some under-informed second-tier celeb.

Other factors complicate his dire predicament. For instance, Miliband has undoubtedly lost some support among Labour-defined Jewish voters because of his Middle Eastern policies. Actor Maureen Lipman, who says she has dumped a half-century of Labour loyalty because of Miliband's sympathy for Palestinian statehood at a time of rising anti-Semitism, thinks that her party should be "once more led by mensches" – ie, men of courage, honour and integrity.

All the same, the evidence now looks strong enough to call a process of ethnic slurring by name. Unconscious they may be, but anti-Semitic images, narratives and insinuations have compromised the authority of the man who aims to become the first British prime minister of Jewish origin since Benjamin Disraeli left office in April 1880. This not need be a question of "dog whistle" politics, in which electoral strategists send coded messages that will tap into private views on issues such as race and immigration that remain officially taboo. The "weirding" or "othering" of Miliband goes even deeper. It reaches down to trigger a kind of latent virus passed on by centuries of European hatred. You may draw out and activate these toxins without being aware of their roots, or their outcomes.

That fatal sarnie – or rather, the symptomatic status it has since acquired – speaks volumes in itself. During the Middle Ages, persecutors and inquisitors used the enforced consumption of pork to harass and humiliate Jews. In the case of converts under duress, pork-eating in public tested their imposed adherence to Christianity. Clerical snoopers would even peer into cookpots to determine the presence of the holy, Christian pig. Marrano, the derogatory term for converted Jews in late-Medieval Spain, means "swine".

Claudia Roden, the great chef-historian of Jewish food, believes that the detachable bits of ham and bacon that go into so many Spanish stews may – for secret Jews and Muslims alike – have served as a convenient way to appease the inquisitors when they called. In Majorca, as she notes in her book The Food of Spain, the "new Christians" conspicuously cooked large quantities of bacon out of doors in order to deflect suspicion. But for Grand Inquisitor Torquemada and his fellow kitchen sleuths, any man who bridled at a bacon butty would have instantly revealed his tainted blood.

Add to that iconic slur the selective sneers at Miliband as strange, abnormal and unworldly. So the party leader who went to a comprehensive school ranks in the right-wing media universe as "Mr Weirdo". Meanwhile, the assorted public-school plutocrats and aristocrats who lead other parties – the Farages, Osbornes, Johnsons and Camerons – are granted a free pass as relatively ordinary blokes. Alumni of Eton, St Paul's or Dulwich, heirs to wallpaper fortunes, fortune-hunting City dealers, television PR chieftains, celebrity editors – if you stand far enough to the right, then any privileged eccentricity of background and career will win a seal of warm approval from the arbiters of normal blokeishness. Raise your voice against the increasingly extremist consensus that governs the British media and your credentials as an ordinary human being – let alone as a plausible prime minister – come under withering fire. This is a Big Lie of positively Goebbels-like proportions.

Much of the hate campaign evidently stems from straightforward, above-board political bias. But beyond the business-as-usual media vilification that in Britain almost always tries to delegitimise a Labour leader prior to a general election, there is something almost demented about the scale and fury of Miliband-bashing. It has an edge not only of dislike or contempt but panic and hysteria. Why? It could be that only the stigmatising repertoire of traditional anti-Semitism – however well hidden, even from the perpetrators – can fully explain this rage.

Back to that sarnie with legs. It has made headlines for six months. Yet for Miliband's foes, it shows no sign of curling at the edges. Just a couple of weeks ago, the Tory militant Toby Young compiled yet another routine litany of Miliband oddities. The bacon sandwich, however, ranked for Young as "the moment Ed's weirdness went mainstream… Again, this was an instance of him trying to appear normal and getting it wrong. Only in this case, not slightly wrong, but horribly wrong." Why "horribly wrong", Mr Young? In what sort of political universe can two seconds of allegedly clumsy pork-eating become the definitive proof of unfitness for high office?

‘Bacon Butty Ed’: months after the event, the incident that typified, for the right-wing media, Ed Miliband’s lack of ordinary blokeishness, is still highlighted (Jeremy Selwyn)

He's not one of us. He doesn't quite belong. He's nerdy, geeky; he tries to act like a regular guy but fails miserably. All standard innuendos. Meanwhile, when Nigel Farage devoured his own bacon sandwich during the Heywood and Middleton by-election, the people's verdict (according to the Mail) "was that he did much better than Ed Miliband". Of course he did. Nige is authentically one of us.

We don't need to attribute malice or bigotry to the vast bulk of Miliband's pursuers (although if you take a peek into the noxious basement of online anti-Semitism, you will find almost nothing else). In his case, some rusty but lethal implements have rolled out of the toolbox of stereotypes. They may still do an effective job, even if most people can no longer read the maker's mark. Anti-Semitic tropes that brand, mock, isolate and belittle the victim as an alien impostor can slip under the radar and avoid detection while still inflicting harm. "Weird" Ed – gauche, weedy, bookish, a stranger to the saloon bar and the porky doorstopper alike – may suffer from the taint of the Jewish outsider without (most of) his foes ever having to think in those terms. Cascading down the ages, the memes of ancient prejudice can easily escape the notice of their carriers.

Fearful of ridicule, or accusations of paranoia, the Labour leader and his colleagues seldom voice this kind of worry openly. All the same, they notice and they care. After the Mail opened the anti-Miliband floodgates a year ago by denouncing his academic father Ralph as "the man who hated Britain", a murmur of anxiety about potential anti-Semitism emerged from his office. More recently, Rachel Sylvester has reported in The Times that Miliband does privately fear that his "outsider" label owes its persistent grip to implicit prejudice. And, for all his avowed secularism and his professed regret at having "missed out" on customs and traditions in his non-religious home, Miliband has embraced his roots more explicitly of late.

On Holocaust Memorial Day in January, he movingly spoke of the relatives – including his grandfather – murdered by the Nazis in Poland. On a trip to Israel, he met Sarah Ben Zvi, his mother Marion's cousin, and told his family history to students. He has outspokenly condemned the anti-Semitic trolling of Labour MPs Louise Ellman and Luciana Berger. That cross-generational experience – of persecution and slaughter in Nazi-occupied Europe, but also of survival, rescue and the devotion of both his parents to careers of public service in Britain – is noble and extraordinary.

So how can even the editor of the New Statesman lazily presume that "Miliband does not have a compelling personal story to tell the electorate, as Thatcher did". According to the Israeli daily Haaretz, which reported on new research into the family history during his visit in April, "More than 60 members of Miliband's family are believed to have died in the Holocaust." In the US, the Miliband chronicle might well count as electoral gold-dust. Here, aided by the knee-jerk nativist clichés that now dominate our public discourse, it almost becomes a source of shame. Why? Perhaps because of the same subterranean forces that make a mountain of political liability out of a sloppy sandwich.

In the respectable media, these stubborn underground motifs of derision, exclusion and humiliation mean that we can have the bigotry without the bigots. Only a few days ago, the commentator Dominic Lawson quoted his own granny's homespun yidishkeyt to write off Miliband as a classic "nebbish". It's surely no coincidence that the glories of Yiddish include so many terms for pitiable losers, deluded no-hopers and blundering nobodies who come to grief when they slam into the implacable hostility of fate.