“No firing squads, no torture or retribution, no bloodshed. A very British coup, wouldn’t you say?” Amid an election campaign that has become ever more ominous in tone, I find myself remembering these words, uttered by Sir Percy Browne, the head of MI5 in the former Labour minister Chris Mullin’s epic 1980s political drama A Very British Coup. Harry Perkins, a leftist ex-steelworker from Sheffield, has swept to power on a radical programme, only to face co-ordinated establishment sabotage. In a climactic scene, Sir Percy blackmails Perkins into resigning on grounds of ill-health.

Ed Miliband is no Harry Perkins. A commitment to raise the top rate of income tax to the same level as Japan’s, to levy a tax on the top 0.5 per cent of homeowners and to cut public expenditure every year is not exactly parliamentary socialism in our time. But long ago, most of the media and other powerful forces in British society decided that the prospect of Miliband as prime minister was simply unacceptable. His leadership represents a modest departure from three decades of consensus established by Thatcher’s governments, but any departure is deemed intolerable. The highly personalised “Get Ed” campaign has taken a sinister turn. The Tories and their media allies are now declaring that a government led by Miliband would be illegitimate. A very British coup of our own. Although openDemocracy has been warning about this possibility for weeks, discussion has been all but banished from the mainstream media.

Our parliamentary system is quite straightforward. A government needs to be able to muster the support of the majority of sitting MPs in order to be legitimate. If it can survive a vote of no confidence, and most MPs back its Queen’s Speech – the government’s legislative programme – then its democratic legitimacy is unimpeachable. The magic number in order to govern – given Sinn Fein’s boycott of the Westminster parliament – is 323. But the Tories and their allies are arguing otherwise. They have told newspapers that they will “declare victory” if the party wins “most seats and votes”, and that Labour will have no “legitimacy” if it is the second party in terms of seats and needs to rely on the SNP. When Theresa May and the Mail on Sunday suggested that an SNP-backed Labour government would represent “the worst crisis since the abdication” – eclipsing the minor blip of the Nazi conquest of Europe – it was rightly mocked on Twitter. But this may well prove a mild foretaste of what is to come.

We are sleepwalking into a dangerous moment. If there is a left-of-centre, anti-Tory majority in parliament then the Tories must fall, however many seats they have won. Left-wing parties will have won the election and a left-of-centre government led by Labour must take office. And yet it would be deemed “illegitimate” by the Tories and most of the media. That really would be a situation with few precedents in an advanced democracy: where the opposition and media refuse to accept the democratic legitimacy of the national government.

The “unionist” Tories have been fanning English nationalism over the past few weeks for two obvious reasons: to boost the SNP in Scotland, in order to increase the likelihood that the Tories will emerge the biggest single party; and to damage Labour in key English marginals. They may well succeed, ensuring a Tory triumph in the general election and leaving this whole scenario redundant. But it never was just a strategy aimed at winning on Thursday. It is a scorched-earth policy, all aimed at what happens after 7 May. The plotters will attempt to administer a fatal blow to the Union, whether they see it as such or not: they will tell the Scottish people that the MPs they have elected are political pariahs who have no rightful say over the governing of the country. And then they will wage the mother of all campaigns against the legitimacy of a Labour-led government.

Our very British coup will surely unfold this way. The Tories declare victory if they have the most seats, regardless of the parliamentary arithmetic. Key supportive newspapers endorse this line and pressure is put on the broadcasters to follow suit. The Tories begin publicly reassembling their coalition with the Lib Dems within hours of the polls closing, despite knowing they have no majority in parliament, in order to cement the image that they remain the legitimate government.

In the run-up to the Queen’s Speech on 27 May – with David Cameron remaining as Prime Minister – the media campaign against the SNP will make the current onslaught look timid. Amid political uncertainty, a falling stock market and the value of the pound are used to build an atmosphere of national emergency. A handful of right-wing Labour MPs – the likes of Rochdale’s Simon Danczuk, perhaps – are wheeled out on TV to echo the line of illegitimacy, helping to construct a narrative of growing Labour turmoil. Moves to depose Miliband are encouraged. The aim will be straightforward: to make it politically impossible for Labour to form a government even though left-of-centre parties have a parliamentary majority, and to pave the way for new elections against a backdrop of right-wing hysteria.

As I say, the Tory campaign of fear or smear over Scotland could prove a success, allowing Cameron to return to No 10. If not, a very British coup will begin to unfold as soon as the polling stations close. It will have few opponents in the mainstream media. The left and the Labour movement will have to mobilise in great numbers. The health of our democracy and the future of our country will be at stake.

Owen Jones joins the New Statesman this week as a contributing writer