Jeremy Corbyn has said he will still be Labour leader in 2020, in an attempt to draw a line under one of his toughest periods at the party’s helm.

The announcement followed a desperate plea for party unity that was undermined before it had even been made by open anger over his and his closest allies’ reaction to the devastating by-election loss in Copeland.

Ex-frontbencher Lisa Nandy slammed what she called the “severely inadequate response” of Mr Corbyn’s allies to the defeat, claiming they had sought to blame others for shortcomings inside the party.

Shadow Attorney General, Shami Chakrabarti, was among those singled out by critics after she gave an interview blaming everything from Storm Doris to poor public transport in Copeland for the humiliating loss.

Deputy leader Tom Watson attacked one of Mr Corbyn’s closest allies, Unite General Secretary Len McCluskey, for ensuring Mr Corbyn had stayed in post but not publicly defending him in “bad times”.

The fall out from the by-election result last week, the first time a governing party has won a seat off an opposition since the early 1980s, has left Mr Corbyn facing deep questions over how long he can survive as leader.

Asked repeatedly on Sky News if he would remain in place at the 2020 general election, he finally replied: “I've given you a very, very clear answer, yes.”

Earlier in the day the beleaguered Labour leader insisted his party and its policies are “needed more than ever”. He added the party must “remain united” in order to win. “Now is not the time to retreat to run away or give up,” he said.

Corbyn mistakenly thanks the SNP during the Scottish Labour Party conference...twice

Speaking at the Scottish Labour Party conference in Perth, he said he took his “share” of responsibility for the Copeland defeat and conceded that Labour had not yet done enough to rebuild trust with disillusioned voters.

But with his critics demanding a change, either in leadership or strategy, anger spilled over when Corbyn ally Baroness Chakrabarti gave an interview suggesting Copeland could in-part be explained by other factors including bad weather, Labour voters being less likely to have a car, low turnout, Brexit divisions, false claims about Mr Corbyn’s views on nuclear power, and ill-treatment in the media.

Labour MP Michael Dugher tweeted: “Pearls of wisdom from the never-having-stood-for-election, joined-ten-minutes-ago wing of the Labour Party: Labour voters ‘don’t have cars’.”

Wigan MP Ms Nandy, ex-shadow energy secretary, said this week’s by-election were “very bad results” for Labour, telling Sky News: “I think the trouble with looking at every factor apart from Labour, is that it’s just a severely inadequate response.”

She added: “Labour is in real trouble and there is no point pretending that isn’t the case.”

Labour's Shami Chakrabarti blames range of factors- except the party's leader- for Copeland loss

The last few days has seen Mr Corbyn also come under pressure from union backers, with Unison’s Dave Prentis branding Copeland a “disaster” and demanding the Leader take responsibility for “what happens next”.

But on ITV’s Peston on Sunday, Mr Watson hit out at Mr Corbyn’s main union backer Mr McCluskey, saying: “If I’ve got some frustrations, it’s that those people that are Jeremy’s cheerleaders, that made sure that he was elected a second time last September, they should be sticking with their leader in the bad times, not just the good.

“Dave Prentis has spoken out but I’d say to you this morning where’s Len McCluskey defending his leader in this difficult time? It shouldn’t be just down to me.”

Gerard Coyne, who is challenging Mr McCluskey for leadership of Unite, also criticised the General Secretary, saying: “As the party’s facing its biggest crisis in over a generation, with the Labour leadership completely disconnected from its traditional support, Len is suddenly nowhere to be seen or heard.

“The silence of Len McCluskey is truly damning. He has driven Labour to the edge of the cliff and then disappeared in a puff of smoke as it tumbles over the edge.”

Mr Corbyn explained the lack of a public appearance from the Unite boss by saying that he is going through a general secretary election, adding that he had spoken to him 10 days ago.

A Unite spokesman said: “Tom Watson is deputy leader of the Labour Party. It is his job to address the issues facing the party in the wake of the by-elections.