The centre of Birmingham at midnight offered plenty of proof of what had just happened. On Broad Street, the neon-lit strip that sits at the heart of the city’s nightlife, an endless parade of young people were shouting their joy. “Corbyn! Corbyn!” yelped three twentysomething men; a woman told me she planned to drink a shot of tequila every time Labour gained a seat. They talked in emotional terms about student debt, the health service, and their belief in a diverse Britain. But perhaps the most moving part was played by a man in a wheelchair, who told us he was penniless and bemoaned the cruelties of the benefits system before he mentioned Jeremy Corbyn, and uttered seven words that made me well up: “Something has to change in this world.”

UK election 2017: full results Read more

With my Guardian colleague John Domokos, I had spent the previous eight hours shooting a film for the Guardian’s Anywhere But Westminster series in nearby Walsall, where Labour held one seat and lost another, it frequently felt very different. There, in neighbourhoods such as Bloxwich and Bentley, an array of older voters echoed all the Tory attack lines on Corbyn, and talked about switching from Labour to Conservative, often via Ukip. Their sentiments sounded like the spirit of Brexit, full of a mixture of fear and obstinacy, and hardened anew by the attacks on London and Manchester: “I don’t think it’s fair that we should be worried in our own country,” said one woman.

But younger people appeared too, and told us they were voting Labour for very different reasons. No sooner had we met a man carrying a copy of the Sun and spitting bile about Corbyn and the IRA than a young nurse and her friend came round the corner, both first-time voters, deeply concerned about the fate of public services, impressed by the Labour leader and passionate about getting rid of the Tories. “Labour are more for young people,” said one. And we got a sense of politics at its most simple and urgent.

With Theresa May perched precariously in No 10 with the support of the Democratic Unionists and a transformed Labour party channelling the suddenly boosted hopes of the millions who want nothing do with her and her party, one thing about Britain has once again become obvious: we are a deeply divided country that has just come through six weeks in which, in England and Wales, at least two elections have been happening at once.

The contest May herself wanted was a laughably flimsy affair, focused on her supposedly strong leadership and her belief that a sufficient share of the public was willing to blankly approve a vision of Brexit that she was unable to articulate. Meanwhile, thanks to Corbyn’s party and its primary-coloured manifesto, a completely different conversation was taking place, which began to define the agenda after May’s U-turn on social care – about the condition of the country and the need for a new social settlement. To all intents and purposes, Labour has just won a historic moral victory, thanks to a faintly miraculous coalition that included not just millions of remain voters but – as proved by a stream of Labour successes in the Midlands, Wales and the north – people who once voted Ukip and backed leave.

To truly understand the significance of what has happened, you have to go back through the events of the last 12 months. First came the EU referendum. Then, towards the end of last year, as May’s vision of Brexit and an England of grammar schools and endless austerity began to cohere, Britain’s departure from the EU started to feel like the central measure in some great British counter-revolution. To visit, say, the Lincolnshire town of Sleaford, where a “Brexit byelection” was held in December last year, was to get a bitter taste of the immediate future: 50-plus people who were conservative, with either a large or small c, rejoicing in the fact that they were in charge while younger people, who had backed remain, talked bleakly about their sense of confusion and rejection. The meaning of this generational divide may have been complicated by what sat underneath a lot of older people’s belief in Brexit – not just the usual hostility to immigration, but the decline of community, the loss of industry, and simple loneliness – but it was painful to see.

Even at the time, it felt fantastically unfair. In its more absurd moments it struck me as resembling the infamous coup against Mikhail Gorbachev in 1991, in which the future was pronounced dead and a gang of half-drunk plotters tried to push their country back into the past. This time, though, the reactionary turn had millions of people on its side. Anyone with halfway progressive and liberal instincts will know the feelings of dread that May’s backward-looking plans brought on: the sense of a cold and broken future, captured in the Daily Mail’s infamous “Crush the saboteurs” front page – whether intentionally or not, Brexit Britain glimpsed in all its Orwellian awfulness.

Let’s not get too carried away. May is still in No 10, Brexit is still on, and the Conservative party’s talent for revival should never be underestimated. The Mail and Sun might be in abeyance, but they are still here. Perhaps most importantly, the almost surreal challenges involved in Britain’s departure from Europe and the economic chaos they may bring could yet trigger another burst of political turbulence. The decline of old tribal loyalties has brought with it the idea that in modern politics pretty much anything can happen. Thursday night was a win for progressives; but, as the Brexit vote proved, things can easily tilt the other way.

Disquiet about where the country was heading after the referendum took a while to find an outlet. It would never have been convincingly expressed by the forces that wanted to overturn Brexit, because they did not concern themselves with austerity and inequality, and threatened to turn their back on the kind of blighted, resentful places that secured leave’s success.

Instead, it turned out that Corbyn and his colleagues’ basic acceptance of Brexit left open the possibility of a Labour revival in its old, leave-voting heartlands. And eventually their argument that the Tories envisaged leaving Europe as another step towards some Thatcherite dystopia chimed with a big part of the public mood. For people, including me, who criticised their contortions on Europe, pointing this out entails eating a big helping of humble pie. That’s fine: it deserves no end of praise.

Building on its amazing breakthrough, Labour now has to cement exactly the kind of alliances – between young and old, town and city, small-c conservative voters and those with more liberal beliefs – that have always underpinned its biggest successes. To acknowledge that this will be an arduous task might sound like an invitation to some weary post-election comedown. It shouldn’t: as Corbyn and his comrades well know, the struggle always continues.