John McDonnell has said that he will not be part of the shadow cabinet of Jeremy Corbyn’s successor as Labour leader, saying: “I’ve done my bit.”

The shadow chancellor suggested that there will be a broader clear-out of Labour’s upper ranks, telling ITV News: “We will all go now. The new leader will come in place and appoint the shadow cabinet.”

In a sign that the Corbynite group at the top of Labour want a successor who will stick with his ideological programme, Mr McDonnell named Labour’s shadow business secretary Rebecca Long-Bailey, shadow education secretary Angela Rayner and shadow justice secretary Richard Burgon as part of a “new generation” that can be expected to take leading roles.

A source close to the shadow chancellor stressed that Mr McDonnell was not stepping down immediately, saying: “John will stay in place until a new leader and new frontbench team is in place."

Meanwhile, shadow foreign secretary Emily Thornberry refused to say whether she will stand for the leadership, telling Sky News: “Let’s have a period of mourning. We need to have a chance to stop and think. I have nothing else to say.”​

Big beasts lose their seats: Prominent MPs gone after election Show all 10 1 /10 Big beasts lose their seats: Prominent MPs gone after election Big beasts lose their seats: Prominent MPs gone after election Dennis Skinner - Labour Labour MP of 49 years Dennis Skinner lost his Bolsover seat to Conservative Mark Fletcher, losing 16% of the vote share PA Big beasts lose their seats: Prominent MPs gone after election Jo Swinson - Liberal Democrat Leader of the Liberal Democrats lost her Dunbartonshire East seat in a 6.8% swing to the SNP PA Big beasts lose their seats: Prominent MPs gone after election Anna Soubry - The Independent Group for Change Leader of The Independent Group for Change, formerly Conservative MP, Anna Soubry lost her Broxtowe seat, coming third behind the winning Conservatives and Labour PA Big beasts lose their seats: Prominent MPs gone after election Dominic Grieve - Independent Prominent Remain-backing MP Grieve lost the contest for Beaconsfield, coming second to the Conservatives, his former party AFP/Getty Big beasts lose their seats: Prominent MPs gone after election Luciana Berger - Liberal Democrat Luciana Berger lost the contest for Finchley and Golders Green, coming second to Conservative Mike Freer PA Big beasts lose their seats: Prominent MPs gone after election Laura Pidcock - Labour Prominent Corbyn ally Laura Pidcock lost her Durham North West seat to Conservative Richard Holden PA Big beasts lose their seats: Prominent MPs gone after election Chukka Umunna - Liberal Democrat Prominent anti-Brexit MP Chukka Umunna lost the contest for the Cities of London & Westminster, coming second to Conservative Nickie Aiken Getty Big beasts lose their seats: Prominent MPs gone after election Zac Goldsmith - Conservative Former candidate for Mayor of London Zac Goldsmith lost his Richmond Park seat to Liberal Democrat Sarah Olney PA Big beasts lose their seats: Prominent MPs gone after election Nigel Dodds - DUP Former leader of the DUP Nigel Dodds lost his Belfast North seat to Sinn Fein AFP/Getty Big beasts lose their seats: Prominent MPs gone after election Gareth Snell - Labour Labour MP Gareth Snell lost his Stoke-on-Trent central seat to the Conservatives PA

Mr McDonnell has previously said it is time for Labour to have a female leader.

He rejected the argument that Mr Corbyn had been “the wrong person” to lead Labour, insisting he could have won power in 2017 and that it was the domination of the debate by Brexit which prevented him doing so this year.

But he also suggested that the swing against Labour in seats the party had held for generations was part of a deeper-rooted disillusionment with politicians.

“It wasn’t just Brexit, it was a long history of maybe 40 years of neglect and them saying to politicians, ‘You never listen to us and you have allowed our communities to be run down in this way.’”

He said Labour needed to go through a process under its new leader of “learning lessons, talking to people, constructing a broad coalition right the way across the country”.

He said: “I’m hoping that that will enable us to construct a programme that will address these issues. It’s got to be from the grassroots and the community upwards.”

Mr McDonnell stopped short of naming a preferred candidate to replace Mr Corbyn.