Labour conference delegates overwhelmingly backed the party’s Brexit policy on Tuesday after Keir Starmer sparked a burst of sustained applause for dropping into his conference speech the line that “nobody is ruling out remain as an option”.

Brexit has been among the most contentious issues in Liverpool. Labour’s members are overwhelmingly pro-remain; but some MPs from leave seats in the party’s traditional heartlands are concerned about any shift that might smack of trying to reverse the 2016 referendum.

In a compromise brokered by Starmer and backed by the vast majority of delegates in a show of hands on Tuesday, Labour’s formal position is now that the party will seek a public vote on Brexit if parliament rejects Theresa May’s deal and it cannot force a general election.

Opening the debate on the issue on Tuesday, the shadow Brexit secretary ad libbed the line, which he had already used in a series of interviews, that “nobody is ruling out remain as an option”.

Delegates in the conference hall responded with noisy applause, with some jumping to their feet.

Asked about the remarks later, Labour leader Jeremy Corbyn said, “Keir put that in because it’s what’s there in the motion. We will challenge this government. If they don’t meet our six tests, we will vote against it, and then we will take it from there.”

“The priority, though, isn’t the arcane wording of motions, it’s about jobs and living standards.”

Manuel Cortes, general secretary of the TSSA union, welcomed the party’s new Brexit policy, calling it, “a huge step forward for Labour”.

“We are uniting behind a position which will allow us to fight Tory Brexit, stand up for migrants and workers and bring down the government at the earliest possible opportunity,” he said. “We have clearly established the principle that we will back a public vote ruling nothing in or out including an option to stay in the EU and fight for the transformation of Europe. Theresa May won’t give people a final say. We will.”

But other senior Labour figures distanced themselves from Starmer’s remarks, which appeared to contradict the stance taken by shadow chancellor John McDonnell and Unite general secretary Len McCluskey, both of whom have underlined the risks of re-running the hard-fought referendum campaign.

McCluskey’s deputy, Steve Turner, took to the stage soon after Starmer’s speech to say: “Despite what Keir said earlier, it’s a public vote on the terms of our departure.”

Shadow justice secretary Richard Burgon, a close ally of the Labour leadership, told the BBC: “There’s a lot of water to go under the bridge before then.

“That wouldn’t be our gift if we’re not in government. Keir Starmer was setting out one of the many possibilities; there’s many junctures in this process,” he said.

Brendan Chilton, general secretary of the pro-Brexit group Labour Leave, described Starmer’s remarks as, “a betrayal,” and, “a P45 to our MPs in the Midlands and Wales.”

In another sign of Labour’s evolving thinking about how it will approach Brexit as the negotiations with Brussels reach their endgame, shadow foreign secretary Emily Thornberry said on Tuesday the party would fight a general election promising to buy time by extending Article 50.

“We should have a general election and on our manifesto we should say ‘we will abide by the results of the referendum’. We cannot obviously leave in current circumstances. We need to extend Article 50,” she said at a fringe event.

“To pre-empt your next question I don’t know how long it will take - but we need to extend Article 50 and essentially turn up in Europe and say the ‘grown ups have turned up now, let’s sit down and talk,” she said.

Article 50 can only be extended by the unanimous agreement of the 27 other member states, and at the request of the withdrawing state, which May has already said she is not prepared to do.

More than 100 local Labour constituency parties sent motions to Liverpool calling for the party to evolve its position over Brexit.

Starmer stressed in his speech that Labour must try to focus on the discontent that sparked the Brexit vote, as well as the details of the deal.

“Brexit has divided this country,” he said. “We must remain united in the fight for our values. The values that hold our party together. Values that can bring our country back together.”