The Peterborough byelection could not have offered more fortuitous circumstances for the Brexit party. This is far from a Labour safe seat: it was held by the Tories with large majorities throughout the Thatcher and Major years, and lost again under Blair in 2005 to a rightwinger, Stewart Jackson, who once declared: “I’m at one with Ukip.”

Peterborough byelection result: Labour scrapes past Brexit party to hold seat Read more

Jeremy Corbyn’s Labour narrowly snatched the seat back in 2017, but its candidate, Fiona Onasanya, was imprisoned after perverting the course of justice and, after bizarrely comparing herself to Jesus Christ, was booted out by a recall petition. At this point, Labour officials privately thought the local party was doomed in a byelection. Peterborough’s 61% vote for leave places it comfortably in the top 20% most pro-Brexit constituencies in Britain. The Brexit party had impetus, having triumphed in the European elections just two weeks earlier, including a decisive victory in Peterborough itself. With polarisation over Brexit at its peak – and Labour itself particularly haemorrhaging support on its remain flank – you couldn’t have developed a more favourable opportunity for Nigel Farage in a laboratory.

Instead he was reduced to fleeing the premises through a backdoor before the result was declared: an increased majority for Labour on a lower turnout. What an abject humiliation for a man whose political parties have never won a single Westminster seat except through the backdoor route of Tory defections. His man of the people shtick – a front for a privately educated ex-City trader who is bankrolled by multimillionaires and whose party is constitutionally committed to “diminish the role of the state” – was rejected. His nemesis? Lisa Forbes, a socialist, working-class woman who grew up on a council estate: his very antithesis. That must hurt. And while the Tories face weeks of bloodletting, Jeremy Corbyn’s position has been profoundly strengthened, reversing the demoralisation after Labour’s kicking in the European elections. The Conservatives, meanwhile, suffered a massive collapse in their vote and their worst defeat in the constituency in more than a century.

Labour’s triumph would not have been possible without its ground game: here is a reminder that it has what other parties lack – a mass membership – which will again kick into action in a general election. The much-demonised Momentum itself played a decisive role, using carpools and social media to mobilise hundreds of activists. Labour’s campaign focused on local issues, from cuts to fly-tipping: in a 20-minute stroll round the city you’ll quickly notice the bleak spectacle of abandoned sofas and fridges. Remember when we used to talk about those boring trivialities such as child poverty, housing and public services? Here is a reminder of why, as a nation, we must surely pivot back to what Theresa May called “the burning injustices”, then proceeded only to make worse.

Exit May. Now begins a battle for the soul of our democracy | Gaby Hinsliff Read more

But there is a warning here for Labour, too. It won in profoundly adverse circumstances, but nonetheless no party has won a byelection with such a low share of the vote since the war – it is a reminder of how polarised and fractured Britain is. The combined Liberal Democrat and Green party share jumped by more than 10 percentage points: many of these are disillusioned Labour remainers who defected from their party’s fold, in the full knowledge that doing so could allow Farage to triumph, underlining their strength of feeling.

Those of us who are Brexit pragmatists – who could live with a compromise of leaving the European Union but with a close relationship – have, sadly, become an endangered species as both sides of the divide have hardened. Labour’s position is de facto a referendum in all circumstances – as shadow transport secretary Andy McDonald underlined on BBC Radio 4 this morning – and, in any case, Labour conference will undoubtedly confirm that policy in primary colours by September. Labour’s zig-zagging pivot towards that position did not lose its seat in Peterborough. The danger is, by the time Labour unequivocally embraces its existing policy, it risks facing all the downsides without reaping any of the benefits: if it loses remain voters in leave seats, including working-class people who are young or BME, it will struggle to win a majority.

For those of us who fear a referendum but recognise that the middle ground on Brexit has collapsed, undermining Labour’s honourable attempt to unite a bitterly divided nation, the party’s welcome triumph in Peterborough doesn’t negate the truth: it would be better for Labour to embrace a full-blooded position that it is inevitably going to arrive at anyway.

• Owen Jones is a Guardian columnist