Jeremy Corbyn has pledged to support a second referendum on any Brexit deal after the Labour leadership came under overwhelming pressure to halt the exodus of its remain voters who backed pro-EU parties at the European elections.

The Labour leader said he was “listening very carefully” to both sides of the debate after the party fell behind the Liberal Democrats and also lost ground to the Greens.

Labour’s preference would be a general election but any Brexit deal “has to be put to a public vote”, he said. Several Labour sources noted this was a shift from his previous position that a second referendum was being kept as an option on the table to stop a damaging Tory Brexit.

He later wrote to MPs: “It is clear that the deadlock in parliament can now only be broken by the issue going back to the people through a general election or a public vote. We are ready to support a public vote on any deal.”

Corbyn’s statement, after a day of frantic lobbying from senior party figures in response to disappointing European election results and recrimination against his senior advisers, moves the party closer to backing a people’s vote. But it does not go quite far enough to satisfy the demands of those in the party who want full backing for a second referendum to be held without delay – and a commitment that the party will campaign on the remain side.

John McDonnell, the shadow chancellor, was among the Corbyn allies who hardened their position, saying on Monday that a second referendum was inevitable because Tory MPs would not back an election. Asked whether it was time to support a second referendum in any circumstances, McDonnell said: “I think it is, yes.”

He added: “Our only option now is to go back to the people in a referendum and that is the position we’re in now.”

Emily Thornberry, the shadow foreign secretary, Diane Abbott, the shadow home secretary, Shami Chakrabarti, the shadow attorney general, and Keir Starmer, the shadow Brexit secretary, also called for a clearer position in favour of a people’s vote on Brexit in light of the European election results.

Starmer said a second referendum was the “only way to break the Brexit impasse” with a “credible leave option and remain”, while Thornberry said: “I fear we will have no deal and we must be clear it will be a disaster for the country so we must have a second referendum.”

May laments 'very disappointing' EU elections as voters take Brexit revenge Read more

In the European elections, Labour was left with just 14.6% of the vote share, and halved its MEPs to 10. Overall, it fell into third place behind the Brexit party and Liberal Democrats, dropping to fifth position with no MEPs in Scotland and coming behind Plaid Cymru in Wales for the first time in a national poll. Mark Drakeford, the Welsh Labour leader and first minister, said the party in Wales now wanted a second referendum and would back a remain vote.

Play Video 1:15 Jeremy Corbyn reacts to Labour losses in EU elections – video

Pressure on Corbyn also came from Tom Watson, the deputy leader, who has given his backing to grassroots groups demanding a ballot of all members or a special conference to formally shift the position, as he believes the party cannot wait until its autumn conference to fully support a second referendum. This would have to be granted by the national executive committee (NEC).

A People’s Vote source said the idea of a ballot of members ought to focus the leadership’s attention, saying: “That threat is there and Jeremy could avoid the kind of summer-long party split that would end up in humiliation – if he moves fast now.”

Paul Mason, the Corbyn-supporting journalist, also backed a Left 2030 petition for a ballot of members and in a Guardian article called for “the officials who designed this fiasco, and ignored all evidence that it would lead to disaster, [to] be removed from positions of influence”.

Labour insiders said Corbyn was keen to avoid being forced into a new position by a damaging public row caused by a members’ ballot but they described the leader as still somewhat torn over the issue as many of his closest advisers and shadow cabinet ministers are in favour of respecting the referendum result.

On the calls to remove Corbyn’s advisers, one source close to the Labour leadership said: “There is absolutely no way they’ll be successful. And they are going for the wrong people. Jeremy’s view is influenced more by the shadow cabinet – people like Jon Trickett, Dan Carden. It is majority leavers.”

A number of Labour MPs who represent leave constituencies are also anxious about backing a second referendum, with Gloria De Piero urging colleagues not to let a second referendum “wreck” the Labour party. She warned a move to such a policy of overriding the 2016 result “would be an effective ending of Labour’s historic coalition of working-class, middle-class, city and non-city voters.”

Len McCluskey, the Unite general secretary, went so far as to accuse some of those calling for a second referendum of trying to whip up a coup against the leadership. “Labour has been the only party that has sought to unite the nation on Brexit and this is an honourable objective that must not be abandoned,” he said.

In a veiled dig at Watson, his old adversary, McCluskey said: “Faced now with the serious prospect of a no-deal Tory prime minister, Labour must stay united and show the country that it is ready to lead. There are some rushing to advance other agendas but are doing so to undermine Jeremy Corbyn. They will be seen for what they are and never forgiven by the members.”

One shadow minister said the leadership was “racked by paranoia about plots” but the truth was that the membership actually wanted to change the policy rather than the leader.

“There is a war going on,” the shadow minister said. “There are people around Jeremy doing everything possible to stop the policy going to a full second referendum. It is a power struggle for the Labour party. Do Len McCluskey, Karie Murphy, Andrew Murray, and Seumas Milne run the Labour party? Or is it the wider Corbyn political project?”

Some on the left of the party openly stressed their calls for a second referendum were nothing to do with trying to remove Corbyn as leader. Manuel Cortes, general secretary of the Transport Salaried Staffs’ Association (TSSA) union, said: “I supported Jeremy Corbyn for the leadership of our party whilst others hedged their bets. Nonsense to suggest that having a policy which chimes with our members is some sort of coup – time to support our brilliant party activists on Brexit.”