If all political careers end in failure, as Enoch Powell once said, how can you possibly explain the remarkable resurrection of Vince Cable last night? The Lib Dem leader, who has announced that he will be stepping down on 23 July, achieved a historic result for his party, securing 20.3 per cent of the UK national vote in the European elections and sending 15 MEPs to Brussels – five more than Labour and second only to the Brexit Party. In a sign of the party's wide support across the country, the Lib Dems managed to win the most votes in Stockport, (which has voted for Labour in general elections since 1987) and received more votes than the Conservative party in Windsor and Maidenhead, Theresa May's constituency.

It is a remarkable turnaround of fortunes. Two years ago, when Cable took over as leader of the party from Tim Farron following the 2017 general election, the Lib Dems seemed an entirely spent force. Despite being the only major UK political party to run on a platform advocating for a second Brexit referendum, the Lib Dems only achieved a meagre 7.4 per cent of the vote and won 12 seats in Westminster. It seemed as if the divisive nature of Brexit along Leave and Remain lines was not yet ready to break the two main parties. And, if there was a large group of Remain-supporting disaffected Labour voters, angry with Jeremy Corbyn’s stance on Brexit, they weren’t willing to abandon their party and support the Lib Dems instead. This may have been because of the Lib Dems’ time spent in coalition with the Conservative party, but equally Vince Cable’s leadership was blamed on the party's inability to win over new Remain voters.

And then the local elections took place earlier this month. The Lib Dems managed to gain 704 councillors, eclipsing the Tories and Labour who lost 1,330 and 84 council seats, respectively. Last night, the party built on that success, and can now justifiably claim to be the main party representing the second referendum cause, after the newly-formed Change UK failed to take any seats in the European parliament, and only won 3.4 per cent of the national vote. It remains to be seen if the Lib Dems will go into coalition or reach an electoral pact with Change UK, but at the beginning of the year it seemed as if the Lib Dems would be subsumed by the fledgling Independent Group, now it’s the other way around.

Initially Vince Cable said that he would stand down as leader just after the local elections. But after the party’s surprise showing, he delayed the announcement (worrying Lib Dem activists who felt their party’s recent success was despite his leadership, not because of it). Cable put them at ease though when he announced this week that he will resign on 27 July.

Nominations are now open for the candidates who wish to replace him, with the current Lib Dem deputy leader Jo Swinson and the party’s home affairs spokesman, Ed Davey, favourites to win the leadership contest. In many ways though, the party’s showing in the EU elections has made the race far more exciting than it was. Before, any potential successor faced the unenviable task of reviving the Lib Dems’ fortunes, as they slumped in the polls and seemed destined for oblivion – the race to succeed him seemed like the political equivalent of two bald men arguing over a comb. Now, the next leader will inherit a party which came second in a national poll, is the Remain party of the UK, and has a formidable base of activists and local councillors heading into a general election.

When he announced his resignation, Cable said that he was ‘proud to hand over a bigger, stronger party.’ That may well be the biggest understatement of the year.