In the coming days and weeks, Labour and the left must reflect on why we lost; on our failures, the challenges that we must face to renew, and the opportunities that we must seize. Simplistic single reasons for the defeat are not credible – Jeremy Corbyn, Brexit, the media – and those peddling them already are interested only in political point-scoring, not rebuilding.

While it is only right that we now focus on the future and learn the right lessons from defeat, it is vital that we also remember the inspirational role that Corbyn and John McDonnell played – not just at the top of the party but before 2015. Like so many Labour activists, trade unionists and peace campaigners, I have long been inspired by Corbyn and McDonnell – by their bloody hard work and resilient political principles. For years, they were there: on picket lines, at protests and at political discussions – when the organised left was little more than a dozen people in a room above a pub.

In 2017, Labour won 40% of the popular vote, and its largest increase in vote share in postwar history

As backbenchers, they fought not for position within the party but for what they believed in – because they hated injustice and because they saw it as their responsibility as MPs to give a platform to those marginalised from power. They didn’t care if that meant they were blackballed by the party leadership or vilified by the press. They were there in solidarity, because that’s what their political principles demanded.

That’s why Corbyn won that transformative, historic leadership campaign in 2015. Because hundreds of thousands of party members respected his integrity, and all those trade unionists, peace campaigners and activists who had campaigned with him in the face of the powerful and been dismissed, were now inspired that one of their own could be Labour leader.

But without the apparatus to wield power in our hands, the Labour left was nowhere near ready for that – let alone to operate in an environment that was intensely hostile and actively trying to displace us. We didn’t have enough MPs we could rely on, or enough bureaucrats (I don’t mean the term pejoratively) capable of effectively running an organisation as large and complex as the Labour party – or even just the leader’s office.

Nonetheless, in the time since Corbyn won the Labour leadership and appointed McDonnell as shadow chancellor, they have changed Labour. It became a party comfortable with public ownership and redistributive taxation, and one that spoke confidently about ending austerity, tackling climate change, raising wages and living standards, and investing in public services. It stopped aping the divisive rhetoric of “skivers and strivers” and started talking about social security.

Let Labour’s fightback begin with a woman as leader | Suzanne Moore Read more

The party became a mass organisation – with membership trebled to over half a million. In 2017, Labour won 40% of the popular vote, and its largest increase in vote share in postwar history. The manifesto, For the Many Not the Few, which I had co-ordinated, managed to unify a Labour party that only a year earlier had been tearing itself apart in a divisive and unnecessary second leadership election.

I am so sorry we weren’t able to get into government. We came so close in 2017, and I really believed we could do it this time. We will all live with that sense of failure. I could hear it in the silence in the office at 10:01pm on Thursday, and I could hear it in the tone of McDonnell’s interview with Andrew Neil shortly after.

Although so many people feel despair, I am convinced that the future is brighter. I looked around me at Labour headquarters in the early hours of Friday morning, and again when I dragged myself back in on Friday afternoon after a quick nap. The people I put an arm around – some metaphorically, some because they were inconsolable – are all brilliant, talented young people, who are not just the future of our movement, but the talented present on which a revival will be based.

It’s worth thinking about what’s changed for the better since 2015. Before Jeremy became leader I would often be the youngest person at sparsely attended Labour meetings. As I turn 40, it’s reassuring that at the now considerably larger meetings, the median age is often below my own.

The left now has thousands of talented organisers, policy people, creatives and yes, bureaucrats who can run things. Jeremy and John made that happen.

There’s plenty of time to analyse the structural problems, the personal failures and, more positively, the road to recovery. My own pretty brutal criticisms, which I shared internally in September, were leaked to the Sunday Times. The fact that among a close group of comrades someone shared that memo with the Murdoch press tells its own story of dysfunction.

But for now, I just want to say thank you to two of the most principled people I know – Jeremy Corbyn and John McDonnell. They have endured unprecedented attacks, but inspired so many.

• Andrew Fisher was the Labour party’s executive director of policy from 2016 to 2019