The British Labour Party has warned Prime Minister Boris Johnson that it is ready to take action through the courts if he tries to push through a no-deal Brexit against the will of parliament.
Shadow Brexit secretary Keir Starmer said the party would do "whatever it takes" to prevent the UK leaving the EU at the end of the month without an agreement.
Addressing the Co-operative Party conference in Glasgow, Mr Starmer said that if Mr Johnson was unable to secure a deal at next week's crucial EU summit, he must comply with the so-called Benn Act and seek a further delay.
"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," he said.
"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."
Mr Starmer poured scorn on suggestions Mr Johnson could get round the law by accompanying a request for an extension with a second letter to the EU saying he did not really want one.
"That's the equivalent of attaching a post-it note to divorce papers saying 'Only kidding'. It's a ridiculous idea."
Mr Starmer said that if the Prime Minister did succeed in getting an agreement, Labour would demand it was put to the public in a fresh referendum.
"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," he said.
With parliament set to sit in a special emergency Saturday session at the end of the week, Mr Starmer said it appeared any agreement Mr Johnson was able to negotiate would be "even worse" than Theresa May's rejected deal.
"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.
Meanwhile, British and EU officials are to continue Brexit talks over the weekend amid speculation a deal is possible, which could break the deadlock over the border.
The EU's chief negotiator, Michel Barnier, gave the green light yesterday for intensive discussions between officials to start.
Mr Barnier is due to brief EU ambassadors and MEPs on Monday on progress.
With UK officials remaining tight-lipped, there has been intense speculation over what was said at the talks at Thornton Manor between Taoiseach Leo Varadkar and Prime Minister Boris Johnson, which enabled the process to move forward.
The discussions focused heavily on the issues of the customs arrangements and the proposed "consent" mechanism for the Northern Ireland Assembly.
The EU strongly objected to a proposal in Mr Johnson's Brexit blueprint for Northern Ireland to leave the customs union together with the rest of the UK - meaning the return of customs controls on the island of Ireland.
The bloc is also concerned that a proposal in the British plan for Northern Ireland to remain tied to EU Single Market rules for trade in goods could be vetoed before it had even got off the ground by the DUP.
There has been speculation that Mr Johnson could now try to revive a compromise proposal first put forward by former prime minister Theresa May that would see Northern Ireland remain politically in a customs union with the EU, but that it would be administered by the UK.
Speaking during a school visit yesterday, Mr Johnson was adamant he would not accept any arrangement which damaged the ability of "the whole of the United Kingdom" to take full advantage of Brexit, including any new trade deals struck with countries around the world.
Meanwhile the DUP has poured cold water over a reported Brexit compromise to end the deadlock over the backstop.