Why does Theresa May urgently need a Brexit deal?
The European Union has been clear from the start of Brexit negotiations that if the UK wants to start negotiating trade deals and a future relationship with the EU, it will first have to come to an agreement on the terms of its exit.
It's now nine months since the prime minister invoked Article 50 to formally begin the process of leaving the organisation. But she has yet to get that divorce agreement signed off, with the last major sticking point being an agreement over the future of the border between Northern Ireland (which is leaving the EU with the rest of the UK) and the Republic of Ireland (which is remaining within the EU).
The prime minister needs to have that divorce deal agreed by next week's meeting of other European leaders in order to give her a chance of reaching a substantive trade deal by the time the UK leaves the EU.
What happened on Monday?
Everyone was expecting a deal. They didn't get one.
Theresa May travelled to Brussels for a long working lunch with European Commission president Jean-Claude Juncker in hopes of finalising the agreement on the terms of the UK's departure from the EU. The meeting was described by chief EU negotiator Michel Barnier's team as "make or break".
And throughout Monday morning, it looked as if the outcome was going to be positive. On the almost impossibly thorny question of the Irish border, there were reports that a deal had been reached on language that would have satisfied the Irish government and allowed the EU to agree that "sufficient progress" had been made to proceed to the next phase of negotiations.
Leaked proposals suggested May was signing up to "continued regulatory alignment" between Northern Ireland and Ireland to ensure there was no need for customs checks on the border. This slightly vague agreement would also provide May with some wiggle room on pleasing Eurosceptic Tory MPs back home.
What went wrong and why isn't there a deal?
Details of the apparent agreement were leaked late on Monday morning via an Irish journalist and a Green MEP from Belgium.
But the language caused consternation among politicians in Northern Ireland's Democratic Unionist Party who will not accept any arrangement that could lead to different arrangements for Northern Ireland compared to the rest of the UK, especially if it meant a customs border between Northern Ireland and the mainland.
The DUP in UK parliamentary terms is a small, pro-Brexit party. But it is also propping up Theresa May's minority government following this year's general election and so has influence far beyond the number of its MPs.
While May and Juncker were still having lunch, the DUP's leader gave a statement at 2:40pm that apparently scuppered the chances of a deal today. "Northern Ireland must leave the EU on the same terms as the rest of the United Kingdom," she said.
"We will not accept any form of regulatory divergence which separates Northern Ireland economically or politically from the rest of the United Kingdom. The economic and constitutional integrity of the United Kingdom will not be compromised in any way."
The BBC reported that May left her lunch with Juncker early to take a call from Foster. Shortly afterwards the deal collapsed.
Irish leader Leo Varadkar later confirmed that his government had agreed to a deal with the UK and the EU but things fell apart late in the day: "It is evident that things broke down and became problematic during the lunch in Brussels."
Is it all over?
Not if you believe May and Juncker's comments at their joint press conference. They hope the issue can be resolved by the end of the week.
"On many of the issues there is a common understanding and it is clear, crucially, that we want to move forward together," said May. "On a couple of issues, some differences do remain."
Juncker added: "I have to say that we were narrowing our positions to a huge extent today, thanks to the British prime minister thanks to the willingness of the European Commission to have a fair deal with Britain. This is not a failure – this is the start of the very last round. I'm very confident that we will reach an agreement in the course of this week."
A source at a rival EU government told BuzzFeed News that negotiations could now continue until next week's meeting of the European Council, beyond the deadline originally set by Brussels officials.
However, Irish leader Varadkar made clear he would not back down before moving on to the next stage of Brexit talks: "My position and that of the Irish government is unequivocal."
"We cannot agree to do this unless we have firm guarantees that there will not be a hard border in Ireland under any circumstances."
What was the reaction from the rest of the UK?
The prospect of a potential special deal for Northern Ireland attracted the ire of the anti-Brexit leaders of Scotland, Wales, and London.
Sadiq Khan took the opportunity to renew his calls for London to remain in the customs union, while Nicola Sturgeon demanded the same compromises for Scotland as Northern Ireland.
Welsh first minister Carwyn Jones, who opposes Brexit despite his country voting narrowly to leave the EU, also demanded further opt-outs to avoid claims of special treatment for Northern Ireland.
How are Tory MPs reacting to this?
Conservative MPs were given an update on the deal in a meeting at the House of Commons on Monday night, and the feeling there among both Leavers and Remainers was that a separate arrangement for Northern Ireland was unacceptable.
Some blamed the Irish government. Jacob Rees-Mogg, a prominent Brexiteer, said it would be "absolutely intolerable" to Conservative MPs have different trade arrangements in Northern Ireland to the rest of the UK. He said the Irish government had been pushing an agreement that would be impossible for the UK to accept, though that version of events is at odds with the strong expectation earlier in the day that May had indeed signed up to compromise language.
Anna Soubry, one of the party’s most prominent opponents of leaving the European Union, said afterwards: "Is it possible that we would have one part of the United Kingdom with a different set of rules than another. There was widespread agreement that nobody wants that. This is a gift for the SNP."
An earlier version of this article included an instance where Ulster was incorrectly used as a synonym for Northern Ireland. In fact, part of the province of Ulster is in the Irish Republic.
Jim Waterson is a politics editor for BuzzFeed News and is based in London.
Contact Jim Waterson at email@example.com.
Alberto Nardelli is Europe editor for BuzzFeed News and is based in London.
Contact Alberto Nardelli at firstname.lastname@example.org.
Alex Spence is a senior political correspondent for BuzzFeed News and is based in London.
Contact Alex Spence at email@example.com.
Got a confidential tip? Submit it here.