Jeremy Corbyn was announced Labour leader on 12 September 2015, having defied initial odds of 200-1 to succeed Ed Miliband in a victory virtually nobody expected – including many MPs who nominated him.

But before Corbyn had even been declared leader, MPs in his own party had already begun plotting to undermine him, with some even walking out of the conference centre in protest as his name was read out.

While Corbyn’s triumph had been thought impossible until just weeks earlier, nobody could have foreseen the scale and intensity of opposition towards him – not just, predictably, from the rightwing press, but from the liberal media and from many of his own colleagues as well.

The Oldham West by-election, scheduled to take place in December 2015, was even touted as an opportunity to remove Corbyn should Labour lose – and a potential defeat was talked up in the centrist press. In the event, Jim McMahon won 62% of the vote. Instead Labour MPs would make their move the following June, organising an anti-Corbyn coup in an unsuccessful attempt to make him the shortest reigning elected leader in party history.

Corbyn won twice for a reason.

Despite the permanent war waged against him, both from within his own party and by much of the media, it is important to remember why Corbyn was twice elected Labour leader. Fundamentally, I think, this can be reduced to three simple reasons.

The first was that he opposed austerity. After the global financial crisis of 2008 both major parties quickly agreed on the fundamentals of what needed to be done: historic cuts to public services. More than simply reducing a high deficit as a matter of necessity, some people on the right in fact believed this would drive growth – what the IMF at the time called “expansionary fiscal contraction”.

This was always bad economics, but for the Tories it meant they could rapidly re-adopt the mantra of the Thatcher years, where the market is always right, and the state is always wrong. For some reason, which I still find hard to understand, many Labour MPs went along with it.

While the claim has often been that it was the left that failed to defend New Labour’s commendable legacy of reducing pensioner and child poverty, they turned out to be the only ones defending it. Incapable of championing their record in government over the previous 13 years, and proposing only a future where there would be cuts ‘harder than Thatcher’, it’s no surprise Labour lost the 2010 general election gaining less than 29% of the vote.

The second reason Corbyn prevailed twice was that while he opposed austerity, and was prepared to defend those parts of the New Labour years that in his mind were worth defending – while many New Labour figures themselves were not – he opposed those decisions widely viewed by the membership as mistakes.

This is most obvious in the case of war in Iraq and Afghanistan, but wasn’t solely limited to foreign policy. He deviated from the party’s consensus on popular issues like public ownership of rail – where, in fact, he was congruent with a majority of public opinion – as well as the role of the City of London and issues like PFI. Furthermore, Corbyn’s internationalism was at odds with a party machine which had become increasingly insular and even jingoistic. The defining image of the Miliband leadership, alongside the ‘Ed Stone’, was the ‘Immigration Controls’ mug.

Again, as strange as it may sound, Corbyn was the inheritor of the best parts of the early Blair years – when Labour presented itself as an internationalist party at ease with Britain as a multicultural country. Corbyn won, against all odds, because he embodied a feeling: that politics could be hopeful about the future and optimistic about human nature. Compared to the dry, stale offer of his three rivals in 2015, and Owen Smith twelve months later, that mattered just as much as the more widely noted ‘straight-talking’.

Ed Miliband’s latest stunt is being compared to a scene from The Thick Of It. #EdStone http://t.co/D7CPvzvfnR pic.twitter.com/mYreGt9nSc — The Independent (@Independent) May 3, 2015

The third reason was that, by 2015, Labour’s complete absence of a political mission had led to electoral disaster. While in 2010 the party received just 28.5% of the popular vote, when Miliband won 30% five years later the party lost dozens of seats in Scotland. By now party members correctly realised something most pundits and party operatives could not admit to themselves: the politics of triangulation in an era of austerity and budget cuts would, as elsewhere in Europe, ultimately destroy the centre-left.

This was particularly pressing not just with the rise of the SNP, who now held 54 of Scotland’s 57 seats, but Ukip (who had just won almost 4 million votes) and the Greens (who had won almost a million). Such utter calamity neutralised the argument historically mobilised against the left: that principles are meaningless without power. To the contrary it now looked like an absence of core political values was taking Labour further away from government, not closer.

Labour MPs – and even then not all – failed to accept any of this until after the 2017 general election, when the party was just several thousand votes away from being able to form a government. If the likes of Tom Watson, Wes Streeting and Hilary Benn had the political discipline of the average Tory over the preceding twelve months, they would likely find themselves on the government benches right now.

What 2017 demonstrated was that Corbyn’s agenda did in fact have a broad political constituency in the country, something which – one hopes – his successor will acknowledge and take further. The alternative is going down the same path as 2008 to 2015: dismissing the left, reflecting an elite consensus on the need for further spending cuts (the aftermath of the coronavirus now makes this highly likely); and a failure to accept Labour can only win power with the offer of a new settlement.

When Margaret Thatcher became Tory leader in 1975 she did so with the backing of a single member of the shadow cabinet, Keith Joseph. In time she would re-cast British politics in her image. It’s not impossible the Corbyn era could have achieved a similar measure of electoral success, but it was always unlikely. There was far more internal opposition, while Corbyn himself was far more collegiate than Thatcher – almost always to his own detriment. Most importantly, the groundwork – of think tanks, advisors, bureaucrats and a new party consensus – had barely been laid. That is now in the process of happening.

Corbyn’s successor can, without any doubt, become the next prime minister. But that will require building on his legacy, not destroying it. A return to the orthodoxy of 2008 to 2015 won’t just mean giving up on principles, but makes it all the more likely that the next political turning point – on a par with 1945 and 1979 – will come from the right, not the left.

Aaron Bastani is a Novara Media contributing editor and co-founder.