In the post-election rows about Labour’s heavy losses, Brexit is ever-present. The party lost 2 million of its 2017 voters to parties that had chosen one side of the European divide more explicitly. Hundreds of thousands of other Labour voters likely stayed at home.

But less examined is the impact that Brexit had on this election simply by being a part of our political culture for so many years. Without downplaying the failures of the Labour party campaign or its leadership, it’s important to remember that the four-year Brexit saga has helped to create the political and social atmosphere in which a populist rightwing party was primed to win.

Amid disruption and chaos there is often a yearning for an authoritarian leader who can promise to get things done

People voted to leave the EU for many different reasons, but the Brexit expected next year is an oligarch-financed populist-right project. However hard some tried to find socialist alibis after the referendum took place (and took Labour voters with it), the impetus for it came from the nationalist right, stoking fears over immigration and yoking these to anti-establishment resentments. High-profile leavers could have focused, post-referendum, on a blueprint for EU departure, but energies went into constructing a majoritarian narrative around the “will of the people”. The 48% who voted remain were cast as the Brexit-sabotaging elite, alongside immigrants, “citizens of nowhere”, city-dwellers, Brussels bureaucrats, parliament, the judiciary, liberals, “woke” leftists and the media.

This narrative was mainlined into social media-boosted rolling news cycles. In scores of exchanges in TV and radio studios, I felt the futility of trying to hold back the tide of illiberal assaults from Brexit campaigners and their newspaper cheerleaders. They would fire off a scattergun of populist right slogans – putting progressives in a quandary over which was worse: chewing up broadcast time in rebuttals, or leaving false and incendiary claims unchallenged. (Of course, some leave advocates made the case without deploying such language – but as a TV producer once told me, they were in short supply.)

The nativist right relishes a good “betrayal” narrative – which is why Johnson and his Brexit brigade were so keen to label the law blocking no deal, enacted in September, as a “surrender act”. It’s why shutting down parliament – and playing with the notion that the judges who forced it to re-open were biased – was necessary, creating the optics of antagonism between the system and “the people”. Amid disruption, chaos and confusion there is often a yearning for an authoritarian leader who can promise to get things done. Last year some even made this point precisely: at least strongmen actually deliver.

This is what Labour was coming up against. It is not to airbrush failures of leadership to suggest the Brexit-ification of political life helped to shape the fury and disappointment so many Labour canvassers encountered nationwide during the election campaign. The Brexit discourse amped up the right’s sense of wounded national pride, which found its perfect antithesis in a Labour leader so often accused of not being patriotic. And while these critiques of Corbyn were in ready supply, it is worth recalling that Boris Johnson was not characterised as anti-British, even while he attacked national institutions such as parliament, threatened public service broadcasting, or misled the Queen.

The toxic atmosphere of this general election was also evidenced by the sheer variety of falsehoods coming from the Conservatives. One BBC News article gave the impression that all political parties were peddling mistruths during the election campaign from its headline. But the article actually revealed that 88% of the Conservative party’s most widely promoted social media ads contained misleading information, according to a First Draft study. The amount of equivalent falsehoods in Labour ads? 0%. One Conservative campaign leaflet sent to Labour battlefields stated that immigration was putting pressure on the NHS, which Corbyn’s plans to “extend freedom of movement” would exacerbate. Following the Conservative election win, there has been a spate of race-hate attacks and far-right demagogues have lined up to join the party.

How can the left counter a dirty tricks culture war with the populist right? Labour wanted to shift the conversation on to economic ground, creating a different “us” versus “them” by pitting the billionaire few, who benefit from the current financial system, against the many who don’t. But the trouble is that this focus on class inequalities could not find sufficient purchase in a political conversation already saturated with rightwing antagonisms. As Labour found out to its cost, if the left does not challenge and dismantle such nativist forces, it risks getting bulldozed by them instead.

• Rachel Shabi is the author of Not the Enemy – Israel’s Jews from Arab Lands