This election campaign has seen an astonishing display of the power of the resurgent British left. Thousands of activists have gone out on the doorstep, mobilised by Momentum and joined by parliamentarians, outriders and even some celebrities in an immensely impressive ground game. If the campaign was just a few weeks longer, we would end it with a double-digit lead over the Conservatives.

The air game has been slightly more mixed. The manifesto is ambitious and impressive, but the absence of a compelling slogan and – more profoundly – an animating story for this election has constrained our ability to sell our policies. Outriders and campaigners have done a heroic job of defending Labour’s policy on broadcast media, but the party machinery has been less effective.

It is, we must remember, historically highly unusual for the British left to be investing most of its hopes in the Labour party. Only a few decades ago, Ralph Miliband was writing of the hopelessness of parliamentary socialism and the need to focus on building a powerful extra-parliamentary left.

In many ways, the most exciting development of the last several years has been the re-emergence of a powerful political movement outside of the confines of the Labour party machine. Whatever happens today, the central imperative faced by socialists will be to maintain the integrity of this movement and expand it beyond its current boundaries.

Either the Labour party will enter government, in which case a strong grassroots movement will be required to combat the inevitable drift towards conciliation with the establishment that takes place whenever socialists gain state power. Or we will be facing another several years of Tory government, in which case our movement will be needed to defend our policies within the Labour party, resist Boris Johnson’s Thatcherite agenda and support those on the sharp end of his policies.

In other words, the task of the left over the coming years must be to continue to build up a self-confident socialist movement that understands itself as independent of, though tightly linked to, the Labour party, and with organic links to communities up and down the country.

The first step towards this goal must be to rebuild the labour movement. This task will undoubtedly be a lot easier if Labour wins the election and can repeal the anti-trade union legislation brought in by successive Tory governments. But if we lose, then we need to prepare for another several years of assault on our unions, which will require new left organisations like Momentum to work closely with and show solidarity for trade unionists.

At present, there is something of a cultural divide between ‘new’ and ‘old’ left – if we are to hold the socialist project together over the next several years, this is a divide that must be bridged. Part of the answer is more effective political education and stronger links with the labour movement on the part of the new left. But most of the unions are also in need of reform.

The labour movement must democratise itself if it is to survive the economic dislocations of the coming years. The ongoing precaritisation of employment, the increasing diversity of the workforce and the coordinated assault on organised labour all require a trade union leadership much more responsive to its rank and file. A democratic and nimble trade union movement capable of both organising within a diverse set of workplaces and making coherent political demands is the sine qua non of socialism in the UK.

The second step must be to focus on organising within communities outside of Labour’s new heartlands – the big cities. Whereas in London and Manchester, working class voters can look around and see the extreme inequalities of wealth and power generated by our financialised economy, those in the regions look around and see only poverty and decline.

Deindustrialisation, the decline of the Labour movement and mounting hostility towards the Labour party have all eroded class consciousness in these places and created fertile ground for the spread of the identity politics of the right. The betrayals of new Labour loom large in the minds of many working class voters, and promises from the party are often treated with cynicism. Many are leave voters, and the narrative of betrayal that has developed around Brexit has not helped matters.

The only long-term solution to this problem is to rebuild the labour movement, and the Labour party, from the ground up in these communities. For this to work, both have to be able to answer particular social and economic problems. Precarity and poverty are only going to mount in these places in the event of another Tory government – socialists must be on the ground organising, educating and building solidarity if we are to translate resentment of the system into demands for change.

These are all huge tasks. Many of us are exhausted after a gruelling campaign, and a gruelling two years. But we must remember that the conditions that have led to the re-emergence of socialism in the UK are not going away. Whatever happens today, we are still living through the interregnum between worlds and our choice remains: socialism or barbarism.