If Boris Johnson succeeds in getting a Brexit deal, Labour will demand it be put to a referendum, the party’s Brexit spokesman has said.

Sir Keir Starmer made the declaration as negotiators from both sides hold talks this weekend in a bid to thrash out a deal.

Sky News understands Prime Minister Boris Johnson has proposed a compromise in an attempt to break the deadlock ahead of a crucial EU summit next week.

Donald Tusk and Michel Barnier

A government source said there had “clearly been some movement on both sides” but there was still a “way to go”.

The rhetoric marks a change in tone from earlier this week, when Downing Street said a deal was “essentially impossible”.

Reacting to these latest developments, Sir Keir said: “If Boris Johnson does manage to negotiate a deal then we will insist that it is put back to the people in a confirmatory vote.”

Speaking at the Co-operative Party conference in Glasgow, he added that Labour was unlikely to support the kind of deal that has been mooted in recent days.

Sir Keir said it appeared any agreement would be “even worse” than Theresa May’s deal, which was rejected three times by MPs.

“No level playing field protections. No customs union. A green light to deregulate. That kind of deal can never be one Labour supports,” he said.

Sir Keir also pledged that Labour would do “whatever it takes” to stop a no-deal Brexit at the end of the month.

He said that if the PM was unable to get a deal at the EU summit, he must comply with legislation passed by opposition parties which compels him to seek a delay Britain’s EU exit.

Sky's deputy political editor Sam Coates explores the plan for Northern Ireland as the EU and the UK government head into intense talks.

“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,” Sir Keir told the conference.

“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.”

Boris Johnson has hinted at a major concession to rescue a deal by refusing to rule out Northern Ireland staying in the EU’s customs union.

He dismissed suggestions Mr Johnson could circumvent the law by making clear to the EU that he did not really want another extension.

The PM’s new proposal would replace the controversial backstop, the insurance policy aimed at avoiding a hard Irish border, which has proved to be the sticking point in negotiations.

Northern Ireland would continue to administer EU tariffs despite leaving the bloc’s customs union.

This would remove the need for customs checks but also allow the businesses north of the border to benefit from new UK trade deals by applying for a rebate from the government.

The EU’s chief Brexit negotiator Michel Barnier has said talks were intensifying “in a constructive spirit” and that Brussels “will do everything it can for an agreement, fully in line with our principles”.

:: Listen to All Out Politics on Apple Podcasts, Google Podcasts, Spotify, Spreaker

Ambassadors from the 27 remaining EU nations will meet on Sunday to discuss progress in the talks ahead of a leader’s summit on Thursday.

MPs will scrutinise any deal agreed with Brussels in a special sitting of the Commons next Saturday.

A government source said there was “certainly a possibility” there could be a vote next weekend on any new deal, but added they were currently a long way from that point.

Downing Street is confident that if the EU and MPs approve an agreement in the next week, there will still be enough time to pass the legislation needed to leave on 31 October.

But MPs calling for another referendum are drawing up plans to amend any vote brought back by the government.