Britain has voted to leave the European Union: here is a statement that continues to shock leavers and remainers alike. Earlier this month I wrote that “unless a working-class Britain that feels betrayed by the political elite can be persuaded, then Britain will vote to leave the European Union in less than two weeks”. And this – perhaps the most dramatic event in Britain since the war – was, above all else, a working-class revolt. It may not have been the working-class revolt against the political establishment that many of us favoured, but it is undeniable that this result was achieved off the back of furious, alienated working-class votes.

Britain is an intensely divided nation. Many of the communities that voted most decisively for leave were the same communities that have suffered the greatest battering under successive governments. The government’s Project Fear relied on threats of economic turmoil. But these are communities that have been defined by economic turmoil and insecurity for a generation. Threats that you will lose everything mean little if you already feel you have little to lose. These threats may well have deepened the resolve of many leavers, rather than undermined it. A Conservative prime minister lined up corporate titans and the US president to warn them not to do something: they responded with the biggest up-yours in modern British history.

This was not a vote on the undeniable lack of accountability and transparency of the European Union. Above all else, it was about immigration, which has become the prism through which millions of people see everyday problems: the lack of affordable housing; the lack of secure jobs; stagnating living standards; strained public services. Young remainers living in major urban centres tend to feel limited hostility towards immigration; it could hardly be more different for older working-class leavers in many northern cities and smaller towns. Indeed, the generational gap is critical to understanding this result. The growing chasm between the generations has only been deepened.

Asking Labour voters to flock to back a flawed status quo endorsed by a Conservative prime minister was always going to be a tough ask. Most of them did, but not enough to compensate for the leave flood. And now what? Scotland has been dragged out of the EU against its will, and the demands for another independence referendum will be difficult to resist. Sinn Féin is calling for a border poll. Economic turmoil beckons: the debate is how significant and protracted it will be. A new, more rightwing Conservative administration seems inevitable: it will undoubtedly pursue a new election, hopefully when Labour is in as divided and chaotic a state as possible. Campaigns to defend threatened workers’ rights and the NHS will be more important than ever. The EU will be consumed with panic about its very existence. These are inevitable political realities to confront.

As for David Cameron. He called a referendum not because he thought it was in the national interest, but because it was useful to manage internal Conservative divisions. The referendum was inevitably framed as a struggle between two Conservative factions. Ironically, Cameron winning the last election was his downfall. If he had won just a handful fewer seats and failed to secure a majority – as he expected – he may not have had to honour his referendum pledge. In a matter of months, he went from suggesting he could support British withdrawal from the EU to warning of economic Armageddon if the country did so. It looked preposterous. He spent years suggesting immigration was a huge problem that needed to be massively reduced, and failed to do so, breeding further contempt and fury.

If the left has a future in Britain, it must confront its disconnect with the lives of working-class people

But while much of the blame must be attributed to Cameron, far greater social forces are at play. From Donald Trump to Bernie Sanders, from Syriza in Greece to Podemos in Spain, from the Austrian far-right to the rise of the Scottish independence movement, this is an era of seething resentment against elites. That frustration is spilling out in all sorts of directions: new left movements, civic nationalism, anti-immigrant populism.

Many of the nearly half of the British people who voted remain now feel scared and angry, ready to lash out at their fellow citizens. But this will make things worse. Many of the leavers already felt marginalised, ignored and hated. The contempt – and sometimes snobbery – now being shown about leavers on social media was already felt by these communities, and contributed to this verdict. Millions of Britons feel that a metropolitan elite rules the roost which not only doesn’t understand their values and lives, but actively hates them. If Britain is to have a future, this escalating culture war has to be stopped. The people of Britain have spoken. That is democracy, and we now have to make the country’s verdict work.

If the left has a future in Britain, it must confront its own cultural and political disconnect with the lives and communities of working-class people. It must prepare for how it responds to a renewed offensive by an ascendant Tory right. On the continent, movements championing a more democratic and just Europe are more important than ever. None of this is easy – but it is necessary. Grieve now if you must, but prepare for the great challenges ahead.