Politicians will “move heaven and earth” to prevent the UK from leaving the European Union without a deal, Labour’s shadow chancellor said.

John McDonnell said “quite a number” of MPs would be prepared to support a compromise deal with the guarantee it goes back to the people for a final say on Brexit.

However no-deal was not a feasible option on the ballot paper, he said.

Ahead of a speech in Gravesend, Kent, he told the Press Association Theresa May’s underlining of the legal default of the UK leaving without a deal on March 29 had led to this week’s rejection.

He said: “I think that’s irritated MPs so much, that’s why no-deal was voted out, and I know that was only an advisory motion but I think MPs would move heaven and earth to prevent a no-deal if she tried that again.”

He went on: “People have looked over the edge, they’ve taken the advice of Theresa May’s own Treasury department, they’ve taken the advice of the Bank of England, every independent assessment of the consequence of no-deal, which is pretty catastrophic for our economy.”

Mr McDonnell was speaking ahead of one of a series of weekend meetings where he has been sharing Labour’s message on austerity.

He said he had not noticed a “dramatic change” in people’s views since the 2016 referendum, but that the party was looking to back backbench proposals to give the public a say over a compromise deal agreed by Parliament.

He said: “We are working with Peter Kyle and Phil Wilson, they have their amendment, which was about going back to the people with whatever was agreed in parliament, so we’ve said we would support that if it comes back, and it may well be this week but it will be down to the tactics they want to pursue, because they will only push that when they think they’ve got a realistic prospect of winning.”

But, he said, any final say must be on a “credible deal”.

He went on: “There’s no point putting Theresa May’s deal or something like that in my view because it’s not credible, it’s dangerous, it has to be a credible deal that we think would protect jobs and the economy, and I think that’s what a majority of MPs would vote for, I don’t think a majority would vote for something that would damage their constituents’ livelihoods.”

Mr McDonnell said he felt a referendum could be achieved in a “relatively curtailed period of time,” but that Brussels will not agree to a delay without a realistic plan.

The electoral commission has said it could take months to organise a further referendum campaign and vote.

Asked if he was concerned a significant delay could draw attention from the party’s internal issues, such as the anti-Semitism allegations, said: “No, the anti-Semitism thing is completely separate and we are keeping our focus on that.

He added: “That’s a separate issue that we’ll deal with and nothing will distract us from it either.”