Jeremy Corbyn has told supporters that his leadership had “changed the agenda on austerity” but that Brexit had prevented Labour from winning power at the last election.

In a parting note to members before he stands down as leader on Saturday, Mr Corbyn said it had been the “honour of my life to lead this party”.

The veteran politician announced he was quitting after leading the party to its worst showing since the 1930s during the December election.

The Islington North MP said he regretted not being able to lead Labour back to power but – in what will be read as a warning to his successor not to deviate from the left-wing path set during his leadership – added: “We have the ideas, policies, energy and organisation to win a Labour government next time.”

The Sunday Times reported that leadership front runner Sir Keir Starmer would look to fire those installed during Mr Corbyn’s reign at the top of the party for “gross misconduct” following their failure to deal with the anti-Semitism crisis that has plagued Labour since 2015, with the shadow Brexit secretary looking to reshape the party if he wins.

In his farewell Facebook post, Mr Corbyn said: “Over the past five years we have changed the agenda on austerity and how the economy is run.

“In 2015, opposing austerity was seen as radical – today it is the political mainstream.

“Of course, we could have achieved so much in government, and I am sorry that under my leadership we did not get there.

“In 2017 we came close, winning the biggest increase in the popular vote since 1945.

“Sadly, the 2019 election was a Brexit election and our attempt to bridge the gap between Leave and Remain voters was unsuccessful.”

Mr Corbyn’s comments come after his wife, Laura Alvarez, accused the media of having “vilified” the outgoing Labour leader and said he was “attacked by his own party” during his four-and-a-half years in the top job.

In a rare public intervention, Ms Alvarez also said the NHS would have been better prepared for the coronavirus pandemic if Labour had united to win power at the 2017 and 2019 elections while her spouse was at the helm.

Mr Corbyn’s wife of seven years has largely steered clear of making public comments since the 70-year-old was elected Labour leader in 2015.

But, in an article in The Mirror, the Mexican revealed it was difficult for her to watch from the sidelines as her husband faced criticism from both the press and the party.

“It has been incredibly hard for me to watch my husband vilified and to hear his words twisted by his political opponents and some in the media,” said the former human rights lawyer.

Corbyn AlvarezLabour leader Jeremy Corbyn with wife Laura Alvarez (Joe Giddens/PA)

“It has been even harder to watch him be attacked by his own party.

“The brutal irony is that if we had pulled together, we would have been ready to lead the country rather than suffer more austerity under the Tories.”

Lisa Nandy, one of the three leadership candidates, said the leadership contest had ended “in the hardest of circumstances” after the ballot closed at noon on Thursday.

The final weeks of the race were largely sidelined due to the coronavirus pandemic, with all candidate events and hustings cancelled.

All three contenders have been asked to pre-record victory speeches in the event they win, with the victor having theirs released on Saturday morning when the result is revealed.

Ms Nandy tweeted a video thanking her supporters and said efforts to reconnect with voters who had deserted the party at the last election showed the party could “win again”.

Sir Keir also tweeted at the close of the ballot, thanking his rivals, Ms Nandy and Rebecca Long-Bailey, for showing “positivity and unity” during the bout.

Those eligible to vote had until midday on Thursday to make their choice before the new leader is revealed on Saturday.

The ballot had opened on February 21, with voting papers sent out to party members, members of affiliated trade unions and groups and 14,700 “registered supporters” who paid £25 to take part on a one-off basis.

Because of the coronavirus emergency, the winners of both the leadership and the deputy leadership race, which has been running in parallel, will no longer be unveiled at a “special conference” as originally planned but via a virtual announcement.

Shadow education secretary Angela Rayner has been seen as the favourite to take the post of deputy leader.

Ms Rayner is in a race against Dawn Butler, Ian Murray, Dr Rosena Allin-Khan and Richard Burgon.