Labour has cleared the way for backing a potential new referendum on Brexit if parliament rejects the deal Theresa May agrees with Brussels.

Shadow Brexit secretary Sir Keir Starmer said that if the Commons votes down the deal the prime minister agrees, then it would be up to MPs to decide what happens next and “all options” would be on the table.

He rejected the idea that if Ms May fails to secure a deal or if parliament rejects the one she agrees then it would be an automatic no-deal Brexit.

Sir Keir also contradicted shadow international trade secretary Barry Gardiner who earlier this week claimed there could be “civil disobedience” in the case of a new referendum.

His remarks came as The Independent’s campaign for a Final Sayreferendum on any Brexit deal reached by Ms May gathered pace, with more than 700,000 people having signed the petition.

Speaking to BBC Radio 4’s Today programme Sir Kier was asked whether the party would back a fresh referendum on Brexit, and said Labour’s position was first to back a vote in parliament.

He went on: “If that vote is to reject the Article 50 deal parliament must decide what happens next.

In those circumstances it seems to me all options should be on the table. So we’ve not called for a vote on the deal. We’ve called for a vote in parliament on the deal.

“But I accept the proposition that if it’s voted down parliament then decides what happens next.

“And in those circumstances in my experience of the last few years, keep your options on the table not off the table.”

But the divergence from words made just two days ago by Mr Gardiner underline the potential risks of division within Labour over the issue, which will feature heavily at this year’s party conference.

Mr Gardiner said Remain and Leave campaigners told voters at the 2016 referendum that their decision “will determine the future of our country for the next 40 or 50 years”.

He added: “If you then say to people ‘We did give you a vote and actually we, the Remainers, lost the vote, but because you were stupid enough to do what you wanted rather than what we wanted….we’ll give you another chance to get it right’ – that undermines the whole principle of democracy in this country.”

Confronted with Mr Gardiner’s words about civil disobedience, Sir Keir said: “I haven’t seen signs of civil disobedience, so I’m sure we can get through this exercise without that.”

He then made clear that his own comments reflected Labour’s position, that “all options should be on the table”.