“Crush the saboteurs” was one of many deranged front-page headlines to grace the general election campaign, as Theresa May sought to engineer a context in which she could cast the Conservatives as the only party committed to Brexit. The collapse of Ukip after the EU referendum left a pool of voters that defined the general election battleground. Labour were prepared for this long in advance: its backing of a three-line whip on article 50 was ridiculed at the time, yet it now looks like shrewd political positioning.

Theresa May tells Tory MPs: 'I got us into this mess and I'm going to get us out of it'– politics live Read more

An election in which the dividing line was whether or not we would be leaving the EU would have handed May’s party a substantial majority. Had Labour attempted to obstruct article 50, it is likely that an election would have been called last year, wiping out many Labour MPs in their heartland constituencies, which voted overwhelmingly for leave.

But having taken the decision to respect the result of the referendum, Labour was able to shift the debate to domestic issues, aided somewhat by the leak of its manifesto. The ensuing intrigue generated wall-to-wall coverage of Labour policy in the lead-up to the official launch, postponing scrutiny of costings until days later.

Despite having called the election, the Conservatives appeared unprepared in their policy development, seemingly hopeful that the battleground would be simply whether or not Brexit would be carried out. There seemed little acknowledgement of what Brexit meant beyond leaving the EU. As David Frum, senior editor at the Atlantic, argued: “Brexiteers promised £350 million a week extra for the NHS. They delivered a dementia tax instead. That the winning argument for Brexit was a (deceptive) promise of more government spending should have been a warning to anti-EU Tories.”

While Labour didn’t tour the country in a red bus promising £350m a week extra for the NHS, there were costed pledges to increase funding – not just for the health service but for all our public services – and a commitment not to raise taxes for 95% of earners. The Conservatives made only vague promises to increase NHS funding, and then ruled out raising taxes for only the top 5% – essentially making Labour’s argument for them.

Many former Labour voters who had switched to Ukip had done so out of disillusionment with New Labour

When May stood on the steps of No 10 for the first time as prime minister, she appeared to acknowledge the discontent that led a majority of Britons to opt to depart from the status quo. She seemed to recognise that the system was clearly not working for most people. Yet her party went into a general election that it did not need to call, producing no transformative policies whatsoever. This ceded vital ground to Jeremy Corbyn – who, with a catalogue of popular policies, was able to capitalise on the anti-establishment Ukip vote in many constituencies in England.

There was an assumption before the election that these Ukip supporters would back the Conservatives, that Ukip was the “gateway drug” that would enable lifelong Labour supporters to vote for May, who before the start of the campaign was very popular with the electorate. But many former Labour voters who had switched to Ukip in previous elections had done so out of disillusionment with New Labour, which lost 5m votes between 1997 and 2010.

Labour’s policy platform under Corbyn, and crucially the party’s respect for the result of the referendum, helped to win those Ukip voters back. The lazy caricature of Ukip supporters in the north of England as caring only about immigration was buried, as those voters chose instead Labour’s viable plan to improve their material wealth.

There were no Controls on Immigration mugs, nor any desire to engage in the immigration debate beyond stating that freedom of movement would end. Instead of trying to address people’s “legitimate concerns” about immigration, Labour put forward a programme that offered hope – a plan to relieve economic insecurity. It is the very tensions that economic insecurity generates that create the context for the far right to peddle their anti-immigrant agenda.

If the Conservatives had wanted to attract Labour supporters in the north, they needed to be more conscious that these voters would probably be looking for any reason not to vote Tory. So May’s decision to duck the debates, her media performances, her awkwardness with the public and the “dementia tax” gave them more than enough reasons – but what cut through more than anything were her views on foxhunting.

'Drop hard Brexit plans', leading Tory and Labour MPs tell May Read more

May’s first speech on the steps of No 10 after becoming prime minister was an attempt to recast herself as not just a competent leader, but as a different kind of Conservative – one who would appeal to working class Labour voters. Backing foxhunting did not fit with how the public had started to perceive her. From then onwards, to many who may have considered voting for her, she simply looked like just another Tory. The general election has damaged not just her party, but her carefully choreographed image – an image that delivered record approval ratings before the election was called. May’s limitations as a political leader make it unlikely that these ratings will ever recover.

Yet Corbyn’s approval ratings have improved considerably since the start of the campaign. The public was finally able to see him for who he was. Like Bernie Sanders, his consistency and his principles are evidence of his integrity. People recognised that he was a different kind of politician, that he genuinely wanted to take on the establishment. This is precisely what made him so appealing to the former Ukip voters the Conservatives thought they had in the bag. But it was taking the entire electorate for granted that cost them their majority.