He has been challenged by his own MPs, savaged by the newspapers and dismissed at the beginning of the election as a no-hoper.
But Jeremy Corbyn is on course to have the last laugh after he secured a bigger number of votes than Tony Blair managed, even in Labour’s landslide victory in 2001.
Pushed by a high youth turnout, the Labour leader’s 12.8 million votes is also more than Blair managed in 2005.
Quite a turnaround for a man some 20 points behind in the polls when the election campaign started and who faced predictions of political Armageddon for himself and his party.
It is also a remarkable personal triumph as Tony Blair has been one of the Labour leader’s biggest critics.
The Labour leader’s 40.1% vote share easily beat Blair’s 35.2% in 2005, where Labour also won the election.
And it almost topped the 40.7% Blair secured for the party in his landslide win in 2001.
Labour’s vote share is also massively up from the last election in 2015 when the party secured just 30.4 per cent under Ed Miliband.
Corbyn’s share of the vote was second only to 1997, when Tony Blair was first elected.
Then Labour won a 43 per cent share of the vote, in a landmark victory.
He also did exceptionally well in his own constituency of Islington North, where he secured the most votes of any MP to there, with a majority of 33,215.
He said the vote in his north London constituency made him “very proud and very humbled”.
It completes a remarkable turnaround for Corbyn, widely dismissed at the beginning of the General Election.
But his message on re-nationalising the railways, ending tuition fees and funding of public services appears to have got through to voters.
At the beginning of the election, Labour’s manifesto was dismissed by some in the media as the “second longest suicide note in history”, echoing criticism of Michael Foot’s manifesto back in 1983.
Labour is on course to get 265 seats against 316 for the Tories, tantalisingly close to a House of Commons majority of 326.