Britain and the European Union reached a new divorce deal Thursday that could allow Brexit on 31 October, but faced immediate opposition among MPs in London -- who can still block it.
The deal was sealed just hours before a summit of EU leaders that is expected to endorse the text, but it must pass the British parliament when it meets on Saturday.
British prime minister Boris Johnson, who has staked his leadership on leaving the EU this month, said he had secured a "great new deal that takes back control".
European Commission president Jean-Claude Juncker said it was a "fair and balanced agreement" -- and both men urged MPs to support it to avoid any further delays.
If Johnson cannot get the deal through by Saturday, he will be forced by law to ask the EU to postpone Brexit, although Juncker said he agreed with Johnson that no postponement should be needed.
"We have a deal, and this deal means there is no need for any kind of prolongation," Juncker said.
It is for EU leaders, not Juncker, to decide whether or not to grant any eventual extension. Several heads of government arriving in Brussels urged British MPs to get behind the deal.
Johnson urged MPs "to come together to get Brexit done, to get this excellent deal over the line and to deliver Brexit without any more delay."
The deal is a personal victory for Johnson, a leader of the 2016 Brexit referendum who was told repeatedly by EU leaders that they would not give him a new deal.
But it could quickly turn to defeat if the House of Commons -- which rejected a previous divorce text three times -- again refuses to play ball.
The immediate reaction was hostile.
Northern Ireland's Democratic Unionist Party (DUP), which props up Johnson's Conservatives, said it "will be unable to support these proposals".
The main opposition Labour, Scottish National and Liberal Democrat parties also spoke out against it.
Their response sent the pound sinking again after it had earlier risen to five-month peaks on news of the deal.
'NO IRISH BORDER'
The draft agreement was forged just weeks before Britain was due to leave the bloc, ending more than four decades of close economic and political ties with its nearest neighbours.
Weeks of tense negotiations focused on changing the arrangements to keep open the border between British Northern Ireland and EU member Ireland.
All sides agree they do not want infrastructure on the frontier, to avoid exacerbating tensions over Britain's control of Northern Ireland that caused decades of deadly violence up until the 1990s.
The new plan would see Northern Ireland remain British legal territory but trade under EU regulations.
"There will be no border on the island of Ireland and the (EU's) single market will be protected," Juncker said.
But it would involve some customs and tax checks with the rest of the UK, and the DUP warned the plans "undermine the integrity of the union".
Northern Ireland's regional assembly would be given a vote every four years on whether to maintain the arrangements.
But the DUP warned that did not go far enough, as there would be no vote before the plans came into effect.
Johnson met repeatedly with DUP leaders this week in a bid to keep them onside -- and has also assured his European counterparts that he can get the deal through.
French President Emmanuel Macron said he was "reasonably confident" the deal could be ratified.
But Johnson has no majority among MPs, and his threat to leave the EU with or without a deal this month has exacerbated existing divisions in parliament.
Opposition Labour leader Jeremy Corbyn said the only way out was for a second referendum, amid speculation such a motion could be put to MPs at Saturday's sitting.
"The best way to get Brexit sorted is to give the people the final say in a public vote," he said.
However, it is not clear there is enough support in the House of Commons for a new referendum, and Johnson's government is strongly opposed.
Opinion polls show Britons remain deeply divided over Brexit, although the balance has shifted slightly in favour of staying in the EU.
Labour's objection to the deal is focused on a perceived lowering of environmental, workers and food standards.
"The deal he's proposed is heading Britain in the direction of a deregulated society and a sell-off of national assets to American corporations," Corbyn said.