The pound plummeted, the Prime Minister resigned, stock markets plunged and the UK began to unravel, as did the post-1945 world order. Donald Trump, Vladimir Putin, Marine Le Pen and Isis were celebrating the Brexit vote but that didn’t stop our disgraceful national press from crowing. “Take a bow, Britain!” the Daily Mail declared. “So long, farewell, auf Wiedersehen, ADIEU”, the Sun quipped in a headline. The Daily Telegraph proclaimed the “birth of a new Britain”.

They and others – the Express, the Morning Star, several of the Sunday papers – were claiming victory: a victory achieved after a relentless campaign of lies and Soviet-style propaganda about the European Union that long pre-dated the referendum. Indeed, it was a campaign that began in the late 1980s and early 1990s, when Boris Johnson, who had been fired by the Times for making up a quotation, was the Telegraph’s correspondent in Brussels.

Johnson did not invent Euroscepticism but he took it to new levels. A brilliant caricaturist, he made his name by mocking, lampooning and ridiculing the EU. He wrote stories headlined “Brussels recruits sniffers to ensure that Euro-manure smells the same”, “Threat to British pink sausages” and “Snails are fish, says EU”. He wrote about plans to standardise condom sizes and ban prawn cocktail flavour crisps. He set up Jacques Delors, who was then the European Commission president, as a bogeyman and claimed credit for persuading Denmark to reject the Maastricht Treaty in 1992 with a Sunday Telegraph splash – “Delors plan to rule Europe” – that was seized on by the Nej campaign.

To Johnson, it was all a bit of a jape. “[I] was sort of chucking these rocks over the garden wall and I listened to this amazing crash from the greenhouse next door over in England as everything I wrote from Brussels was having this amazing, explosive ­effect on the Tory party – and it really gave me this, I suppose, rather weird sense of power,” he told the BBC years later.

That many of Johnson’s stories bore scant relation to the truth did not matter. They were colourful and fun. The Telegraph and right-wing Tories loved them. So did other Fleet Street editors, who found the standard Brussels fare tedious and began to press their own correspondents to follow suit. I know this because I became the Brussels correspondent of the Times in 1999 and suffered the consequences.

Soon, a Europe of scheming bureaucrats plotting to rob Britain of its ancient liberties, or British prime ministers fighting gallant rearguard actions against an increasingly powerful superstate, or absurd directives on banana shapes, became the only narratives that many papers were interested in. They were narratives that exploited our innate nationalism, distrust of foreigners and sense of superiority. They were narratives so strong that our political leaders mostly chose to play along with them.

The EU is arrogant, bureaucratic, wasteful and meddlesome. It desperately needs reforming. But post-Boris, its great achievements – cementing peace, uniting the continent, creating the world’s largest single market, enabling its citizens to travel and live anywhere they choose, busting mono­polies, improving the environment – have gone largely unreported. Similarly ignored is that Britain has many natural allies in Europe and has enjoyed some significant successes: competition policy, free trade, eastward enlargement. The French now regard the EU as a plot to impose Anglo-Saxon economics on the continent. True, we lost the argument on the euro and the Schengen Agreement, but we won opt-outs.

With a few honourable exceptions – such as the Financial Times, the Times and the Guardian – the referendum coverage was merely a supercharged version of what had gone before. It was led by the biggest broadsheet (the Telegraph), the biggest mid-­market paper (the Mail) and the biggest tabloid (the Sun). And it was based on myths: that we pay £350m a week to Brussels, that we can continue to enjoy access to the single market without freedom of movement, that millions of Turks are heading our way because their country is about to join the EU, that immigrants are destroying the NHS rather than keeping it going.

The coverage was designed to inflame xenophobia and our worst “Little England” instincts. Loughborough University found that 82 per cent of all referendum stories, adjusted for newspaper circulations, were negative. The conventional wisdom is that newspapers don’t matter any more but they do when just 635,000 votes for Remain ­instead of Leave would have averted this national catastrophe. They do when the press is a primary source of information for millions of Brits. They do when most of our papers have relentlessly portrayed the EU as the monster of Johnson’s fertile imagination, not just for a few months, but for more than two decades.

The referendum was a chance for our national press, particularly the tabloid press, to restore its standing after the phone-hacking scandal and to prove its continuing worth to the British people. Sadly, most newspapers chose wilfully to deceive, mislead and inflame. They decided to follow Johnson’s lead by peddling lies and phoney patriotism. They helped him to hoodwink the millions of poorer, less-educated Britons – those who will be the first to suffer from Brexit’s consequences – into voting against their own interests.

Johnson campaigned against a myth of his own creation, with the result that a mendacious pundit, one who achieved prominence by writing entertaining but dangerous nonsense, is the odds-on favourite to be our next prime minister.

Martin Fletcher is a former foreign editor of the Times