John McDonnell has signalled that Labour is moving closer to backing a second public vote on Brexit.

The shadow chancellor said Labour had kept the option on the table and “we’re moving towards that”.

His comments come with Labour deeply divided over the issue which was partly responsible for the breakaway Independent Group of MPs quitting the party.

Labour’s position, thrashed out at the party’s conference last year, keeps open the option of a so-called People’s Vote if Theresa May is unable to get a deal through Parliament and there is not a general election.

Mr McDonnell told the Evening Standard: “On the People’s Vote, we’ve kept it on the table and we’re moving towards that.”

He said Labour was “moving into implementation stages around our conference decision, around the People’s Vote”.

A compromise plan put forward by Labour MPs Peter Kyle and Phil Wilson could present a route to the party supporting a vote.

The two MPs have devised a plan to support the Prime Minister’s Brexit deal on the condition it is put to a confirmatory public vote.

The Commons could be asked to vote on the Kyle-Wilson amendment next week.

Mr McDonnell said that any referendum would have remaining in the European Union as the alternative to the deal.

“If we were going on a People’s Vote based on a deal that has gone through Parliament in some form, if that got voted down then you’d have status quo, and that would be Remain,” he said.

The shadow chancellor said that if it was an option “I’d campaign for Remain and I’d vote for Remain”.

A spokesman for the People’s Vote campaign said: “It looks like Labour will test whether its Brexit plan has the support of Parliament next week.

“It deserves scrutiny but, with the Prime Minister effectively ruling out a customs union, John McDonnell and other senior Labour figures recognise there will be only one option left for them which is in line with party policy.

“If they back compromise proposals to put any final Brexit deal to the people, it will help unite their party, as well as avoid the catastrophe for their constituents of a no-deal departure from the EU.”

Meanwhile, Jeremy Corbyn was setting out his Brexit plans in Madrid at the Party of European Socialists meeting.

Mr Corbyn said: “The damaging deadlock on Brexit must be broken and following my discussions with European Union leaders and officials, I am in no doubt that Labour’s alternative plan is credible and could be negotiated with the EU.”

He added: “None of us can allow Britain’s exit from the European Union to be exploited by the whims of big business and the super-rich.

“Companies who shift their accounting operations back and forth across borders to minimise their tax bills are carrying out daylight robbery.

“By failing to crack down on aggressive tax avoidance, Theresa May is allowing the British public to be ripped off and exposing the kind of Brexit she and her party want to deliver.”