London: A breakthrough Brexit deal may be just hours away, as diplomats worked around the clock to try to untangle the political nightmare of the Irish border.
Late Thursday night, British time, some were confidently predicting that before the weekend there would be a handshake agreement on the so-called 'divorce settlement' between Britain and the European Union.
But others feared a repeat of the debacle of the beginning of the week, when May visited Brussels and all sides thought they had a deal until the UK government's political allies, the Democratic Unionist Party of Northern Ireland, pulled the plug.
A spokesman for the EU said "tonight more than ever, stay tuned".
Downing Street was more cagey, saying only that "discussions are ongoing".
British prime minister Theresa May is expected in Brussels early on Friday morning for high-level meetings if the overnight talks go well.
Brussels has insisted that there must be "sufficient progress" on the issues of the financial closing of accounts, the rights of EU citizens in the UK, and the border between Northern Ireland and the Republic.
Only then will it open talks on the future relationship between Brexit Britain and the continent, including crucial trade and customs arrangements.
The middle of next week is the last European Council meeting of the year: the last chance for the 'EU 27' countries to agree to proceed to Brexit stage two before a long winter hiatus.
According to leaks from the talks, there is broad agreement on the financial settlement (expected to be around 50 billion euros paid over time), and on EU citizens' rights.
But the sticking point is the Irish border, which both sides insist must remain open.
They are seeking a form of words that somehow does not lead the DUP to believe Northern Ireland's laws will diverge from the UK's, does not lead to differences in trade and customs regulations between north and south that would require border checks - but still allows the UK to set its own trading rules separate to the EU's.
The result of the talks is likely to be a hedge, rather than a solution to this knotty problem.
There was a round of talks between the leaders on Thursday evening, in a push to the finish line.
May spoke with Irish prime minister Leo Varadkar and European Commission president Jean-Claude Juncker in separate telephone calls, Downing Street said.
And EU Commission spokesman Margaritis Schinas said Juncker had also spoken to Varadkar, before he spoke to May.
"We are making progress but not yet fully there," Schinas said. "Talks are continuing throughout the night. Early morning meeting possible. thereafter.
"Tonight more than ever, stay tuned."
A spokesman for May said "Discussions about taking forward the Brexit process are ongoing".
The BBC reported that a draft deal had been agreed between the EU and Britain - and approved by Ireland - but the DUP were still considering it on Thursday night.
Though the DUP's Westminster leadership were in favour, its Belfast leadership had not yet agreed.
May's Conservatives rely on DUP support in Westminster for their minority government, so they cannot afford to antagonise them by signing a deal the DUP do not approve.