Jeremy Corbyn has called on the next Tory leader to hold a second referendum before taking Britain out of the EU – and said Labour will campaign for Remain.

Following a meeting of the shadow cabinet at Westminster, the Labour leader said that whoever wins the Conservative leadership contest should have the confidence to put any new deal they negotiate with Brussels – or no-deal – to the public.

The move follows weeks of wrangling within the party over its position on Brexit – backing a second referendum only in certain specific circumstances – which was widely blamed for its dismal showing in the European elections.

Whoever becomes the new Prime Minister should put their deal, or No Deal, back to the people in a public vote.

In those circumstances, Labour would campaign for Remain against either No Deal or a Tory deal that does not protect the economy and jobs.

In a letter to party members, Mr Corbyn said Labour would campaign for Remain “against either no-deal or a Tory deal”, but did not explain what Labour would do if it won a general election.

The move comes a day after leaders of some of the party’s largest affiliated trade unions moved to back a second referendum.

Among those present was Unite general secretary Len McCluskey, a key ally of Mr Corbyn, who has previously resisted calls for a confirmatory vote.

In the letter, Mr Corbyn wrote: “Now both Tory leadership candidates are threatening a no-deal Brexit – or at best a race to the bottom and a sweetheart deal with Donald Trump.

“I have spent the past few weeks consulting with the shadow cabinet, MPs, affiliated unions and the NEC (national executive committee). I have also had feedback from members via the National Policy Forum consultation on Brexit.

“Whoever becomes the new prime minister should have the confidence to put their deal, or no-deal, back to the people in a public vote.

“In those circumstances, I want to make it clear that Labour would campaign for Remain against either no-deal or a Tory deal that does not protect the economy and jobs.”

Both Boris Johnson and Jeremy Hunt have said that, if they win the race for No 10, they would seek to renegotiate the terms of Britain’s withdrawal, but would leave without a deal if they failed to do so.

Labour deputy leader Tom Watson, who has been at the forefront of demands for the party to back a second referendum, welcomed the shadow cabinet decision.

“Our members have been telling us for some time now they want us to be a Remain party, they want us to put the new deal to the people,” he told the BBC.

“We are now going to campaign for that. I am very proud the shadow cabinet have listened to their concerns.”

Shadow Brexit secretary Sir Keir Starmer said he was “really pleased” with the pledge, describing the campaign for Remain as “a really important point of principle”.

“The trade unions are behind it, the shadow cabinet’s behind it and I know it’s what our members want,” he added.

Labour MP and chairman of the Brexit Select Committee Hilary Benn hailed the “very significant” announcement, which he said will be “widely welcomed” within the party.

It is understood Labour would decide its general election stance ahead of a national vote when working on its manifesto with members, trade unionists and the shadow cabinet.

The party was not entirely united behind the announcement, with Brexit-backing Labour MP John Mann saying the move will lead to the loss of Leave-voting voters and be a gift to the Tory leadership front-runner.

“The one person who will be smiling at today’s announcement is Boris Johnson. I think it gives him quite a boost when he wins the Tory leadership,” he told the BBC’s World At One.

The Liberal Democrats pointed to Labour’s lack of clarity on what the party would do if it won control of Parliament in an election.

Brexit spokesman Tom Brake said: “Jeremy Corbyn can pretend all he likes that the Labour Party are finally moving towards backing the Liberal Democrat policy of a People’s Vote.

“But it is clear it is still his intention to negotiate a damaging Brexit deal if he gets the keys to Number 10.”

Mr Hunt said the Labour leader “never believed in Britain”, adding: “In this country we deliver on the will of the people. We will deliver Brexit and make a success of it.”