A fresh referendum is the only way to break the Brexit deadlock, Keir Starmer has said in a move likely to fuel divisions at the top of Labour.

The shadow Brexit secretary said there was “only one way out” of the current impasse and made no mention of efforts to first trigger a general election, despite this being the party’s official policy.

His comments will be interpreted as throwing his weight behind calls for Labour to prioritise another referendum over an election, and come ahead of a week in which MPs are expected to try to secure a Final Say vote.

Senior figures in Labour remain divided over what the party’s position on Brexit should be. Tom Watson, the deputy leader, and Emily Thornberry, the shadow foreign secretary, are among those pushing for a referendum to be the priority, but Jeremy Corbyn and his team insist an election must come first.

Mr Corbyn is expected to face a major rebellion from his MPs if he agrees to Boris Johnson’s plan for an early election, without first having guaranteed a Brexit referendum.

Sir Keir’s claim that another public poll is the “only” solution will be seen as him siding with other shadow cabinet ministers warning that an election before a referendum could lead to Britain crashing out of the EU.

Speaking at the Co-operative Party conference in Glasgow, Sir Keir said: “Whatever it takes, we will prevent a no-deal Brexit, but of course we have to recognise, important though that is, preventing a no-deal Brexit is not an end in itself.

“It won’t break the deadlock, it won’t allow the country to move on. After three-and-a-half long years of failed promises, failed deals and Tory divisions, there is only one way out: put it to the people.”

He continued: “We need to ask the public whether they are prepared to leave with the best deal that can be secured, or whether they wouldn’t rather remain in the EU. The people must have the final say. It is only by asking the people that we can draw a line under this.”

Brexit and climate protests at Labour party conference: In pictures Show all 12 1 /12 Brexit and climate protests at Labour party conference: In pictures Brexit and climate protests at Labour party conference: In pictures Labour leader Jeremy Corbyn walks past anti-Brexit campaigner on the second day of the party conference in Brighton AFP/Getty Brexit and climate protests at Labour party conference: In pictures A protester holds a sign mocking Labour leader Jeremy Corbyn's Brexit stance at the party conference in Brighton EPA Brexit and climate protests at Labour party conference: In pictures Activists from anti-climate change movement Extinction Rebellion march on the Labour conference in Brighton AFP/Getty Brexit and climate protests at Labour party conference: In pictures Delegates take part in an informal vote on Labour's Brexitr stance at the party conference in Brighton AFP/Getty Brexit and climate protests at Labour party conference: In pictures Shadow foreign secretary Emily Thornberry leads a march in support of a second referendum on Brexit Getty Brexit and climate protests at Labour party conference: In pictures Anti-Brexit protesters take part in a People's Vote rally during the Labour party conference in Brighton EPA Brexit and climate protests at Labour party conference: In pictures Extinction RebelliActivists from anti-climate change movement Extinction Rebellion march on the Labour conference in Brightonon EPA Brexit and climate protests at Labour party conference: In pictures Extinction Rebellion activists march on the Labour conference in Brighton AFP/Getty Brexit and climate protests at Labour party conference: In pictures A delegate arrives carrying a briefing from the Labour Representation Committee to the Labour party conference in Brighton Getty Brexit and climate protests at Labour party conference: In pictures Prominent anti-Brexit campaigner Steve Bray protests on Brighton beach during the Labour party conference Reuters Brexit and climate protests at Labour party conference: In pictures Anti-Brexit protesters take part in a People's Vote rally during the Labour party conference in Brighton EPA Brexit and climate protests at Labour party conference: In pictures Activists raise a banner calling for the Labour party to restore the original Clause 4 of its constitution, which would pledge the party to nationalising all industry Getty

Sir Keir also said Labour could take the prime minister to court if he tries to force through a no-deal Brexit in defiance of a law saying he must instead seek an extension if no deal is agreed by 19 October.

He said: ”If he can’t – or I should say won’t – get a deal we will take whatever steps are necessary to prevent our country crashing out of the EU without a deal.

“If no deal is secured by this time next week, Boris Johnson must seek and accept an extension. That’s the law. No ifs, no buts.

“And if he doesn’t, we’ll enforce the law – in the courts and in parliament. Whatever it takes, we will prevent a no-deal Brexit.”