EU and UK negotiators had worked overnight on a compromise withdrawal deal that British Prime Minister Boris Johnson hoped to present to his counterparts.
But, as dawn broke over Brussels, Northern Ireland's Democratic Unionist Party dramatically rejected the accord, which would see the British-ruled province remain under EU customs and Value Added Tax (VAT) rules.
It was not immediately clear if this meant that Johnson would have to back away from the draft text, as his government is propped up by DUP support. But it greatly complicates his chances of getting it though the British parliament.
The pound, which had been buoyed earlier in the week by rumours of a deal, tumbled after the DUP statement.
"Will have to consider our options in the light of the situation," a senior EU official said. "Maybe we have a deal or maybe not." EU leaders will be loath to approve another withdrawal agreement only to see it rejected in London, as happened with the last Brexit deal.
"Yesterday (Wednesday) we were willing to give more time to the negotiators, still today we don't know how things evolve," the EU official said.
"So far member states have demonstrated incredible patience." Before setting off for Brussels, Germany's Chancellor Angela Merkel noted that London had been ready to negotiate and put "concrete proposals on the table" but added the teams were "still not at the goal".
The DUP's patience, however, seems to have run out.
"As things stand, we could not support what is being suggested on customs and consent issues, and there is a lack of clarity on VAT," the party said.
"We will continue to work with the Government to try and get a sensible deal that works for Northern Ireland and protects the economic and constitutional integrity of the United Kingdom." In Brussels, EU officials were expecting more contacts with British representatives before Johnson and the other 27 EU leaders arrived for the two-day European Council summit.
EU Commission president Jean-Claude Juncker spoke with Johnson by telephone to see what could be done to save the deal. "Every hour and minute counts," his spokeswoman said.
Before the DUP statement there had been guarded optimism that this time, just two weeks before Britain is due to quit the bloc on October 31, the groundwork was there for a deal to avoid calamitous economic disruption.
"An agreement appears within reach but it is not guaranteed," French deputy foreign minister Jean-Baptiste Lemoyne said. "We're hoping for a deal and if it can come in the coming hours, that would be perfect." Under the measures to replace the so-called "Irish backstop" in the previous failed agreement, the plan would see Northern Ireland remain British legal territory but trade under EU regulations.
This is intended to prevent the return of a hard border with EU-member Ireland. But, because it would involve some customs and tax checks with the rest of the UK, it raised the hackles of the pro-British DUP.
EU negotiator Michel Barnier said late Wednesday there had been "good progress, and work is ongoing" as he briefed a late-night gathering of leading MEPs.
But one EU source told AFP the putative agreement "is politically fragile in London" because of Johnson's reliance on votes from the DUP and hardline Conservative eurosceptics.
And there were doubts that a final legal text could be completed before the end of the summit, although leaders may give political approval to open the way for a binding agreement to be finalised in the weeks to come.
The leaders also hope the summit will rise above the Brexit mire and focus on the EU budget debate, bids by North Macedonia and Albania to start talks to join the bloc, and the crisis in relations with Turkey.
The Brexit issue is notionally first on the agenda, with the EU's 27 other leaders to hear Johnson speak then retire to mull their response. But the issue could be delayed to Friday if the deal text needs more work.
Johnson has vowed to take the UK out of the European Union on October 31, with or without a divorce agreement to maintain orderly economic ties with its former partners.