After May 2015, Labour appeared so far from power that many supporters conceded the next election in advance. The party was 99 seats behind the Conservatives (331-232), it had been wiped out in Scotland and boundary changes loomed. Such was the scale of Labour’s defeat that to achieve a majority of one it required a swing of 8.75 per cent across the UK. Not only had the party lost seats, it had gone backwards in those it needed to win.

But Labour’s 2017 result, which saw it achieve its biggest improvement in vote share since 1945 (from 30.4 per cent to 40.0 per cent) has dramatically reshaped the electoral map in its favour. My analysis, the first to be published, shows that a majority at the next election, whether it comes this year or in 2022, is now within Labour’s reach. As well as gaining 30 MPs (from Canterbury to Kensington), Jeremy Corbyn improved the party’s performance elsewhere, turning safe Conservative seats into marginals.

To achieve a majority of one (326), Labour now needs a modest swing of 3.57 per cent. To become the largest party it needs to win 34 seats (24 from the Conservatives, nine from the SNP and one from Plaid Cymru), requiring a swing of just 1.63 per cent, or 29 directly off the Tories (requiring a swing of 2.01 per cent). The winning post in the latter case is Ed Balls’s former constituency of Morley and Outwood (Tory majority: 2,104). The seat needed for a majority of one is the SNP-held East Kilbride, Strathaven and Lesmahagow (majority: 3,866).

The party’s nascent recovery in Scotland, where it went from one MP to seven, has made an overall victory far more plausible. Of Labour’s 64 target seats, 18 are SNP-held. The remainder are held by the Conservatives, with the exception of Plaid Cymru’s Arfon. Vulnerable Tories include Home Secretary Amber Rudd in Hastings (majority: 346), Anna Soubry in Broxtowe (majority: 863) and Iain Duncan Smith in Chingford and Woodford Green (majority: 2,438). Though they long to be rid of Theresa May, such stats explain why the Conservatives are desperate to avoid another election.

May’s squandering of the Conservatives’ majority also means they will struggle to pass the planned boundary changes. The party’s traditional divisions on Europe are resurfacing in a new form as hard and soft Brexiteers clash. Unless the next Conservative leader breaks with austerity, the party will struggle to win as living standards further decline (though it is hard to imagine a worse Tory election campaign).

A hung parliament came as a surprise to most in Labour (including Corbyn allies) but at the next election the party can sets its sights higher. A potential majority coalition of socialists, liberal Remainers and conservative interventionists is emerging. Far from being condemned to the wilderness, Labour is within reach of government once more.