After months of talks and a major last-minute hitch, the European Commission has finally announced that "sufficient progress" has been made in the first phase of Brexit negotiations and work can now begin on the all-important future trade deal.
Here is how we got to this point:
November 29 - The pound climbs to its highest level in almost two months against the dollar amid hopes that progress is being made on Britain's divorce settlement with the EU.December 1 - European Council president Donald Tusk warns Theresa May she must satisfy Irish demands that there will be no "hard border" between the Republic and the North if negotiations are to move forward and on to trading arrangements.December 3 - Speculation that a deal is imminent mounts as Mrs May prepares to meet key EU figures Jean-Claude Juncker and Mr Tusk for crunch talks in Brussels.December 4 - Mr Juncker meets Ireland's Taoiseach Leo Varadkar minutes before meeting Mrs May, amid reports of a major compromise to ensure there is no hard Irish border - a key demand by Dublin.
Mr Tusk fuels hopes of a deal when he says the two sides are "getting closer" after talks with Mr Varadkar.
Those hopes are dashed when the Democratic Unionist Party refuses to accept proposals which would have aligned regulations north and south and shifted Northern Ireland's customs border to the Irish Sea.
Mrs May and Mr Juncker end their meeting by confirming no deal has been done but insisting sufficient progress would be made in time for the December 14 summit of the European Council.
Mr Varadkar says he is "surprised and disappointed" no deal has been secured yet.
December 5 - The Prime Minister hits the phones as pressure mounts on her to break the logjam. But in a possible sign of how intractable the issue has become she does not speak to DUP leader Arlene Foster.
Mr Varadkar tells the Dail "the ball is in" Mrs May's court in terms of resolving the border issue.
December 6 - Mrs May holds telephone talks with Mrs Foster.
At PMQs, she pledges to protect the "constitutional integrity" of the UK.
With the clock ticking, Mr Varadkar warns that Mrs May could have to wait until the New Year for a green light to start talks on future trade arrangements unless sufficient progress is made.
In a phone call, Mrs May tells Mr Varadkar she is "working hard to find a specific solution to the unique circumstances in Northern Ireland" and is committed to "moving together to achieve a positive result on this".
Meanwhile, there are calls for David Davis to resign as Brexit Secretary and face an investigation for contempt of Parliament after he admits that the Government has produced no impact assessments on the effect of Brexit on different sectors of the UK economy. He had earlier said his department was "in the midst of carrying out about 57 sets of analyses" on different parts of the economy.
December 7 - Frantic behind-the-scenes talks continue throughout the day.
First signs of a breakthrough come at about 5pm with the announcement that Mr Tusk will make a statement on Brexit early on Friday morning.
But a UK Government source seeks to play down expectations, declaring: said: "We're not there yet."
Mr Juncker calls Mr Varadkar and then Mrs May as his spokesman says an early morning meeting with the UK PM is "possible".
UK Government chief whip Julian Smith sends a series of tweets which hint at movement, saying the PM had "worked tirelessly" and adding: "I will continue to do everything I can to ensure that the views of Conservative MPs are fully reflected in phase 2."
December 8 - Talks continue throughout night.
At 5am, Downing Street confirms that the Prime Minister and David Davis are travelling to Brussels to meet Mr Juncker and EU chief Brexit negotiator Michel Barnier.
Mrs May arrives in Brussels shortly before 6am and talks with Mr Juncker begin immediately.
Within minutes, Mr Juncker's head of cabinet Martin Selmayr signals that a deal has been done as he tweets a photograph of white smoke gushing from the chimney of the Sistine Chapel - the traditional way of alerting the world that a new Pope has been chosen.
Confirmation comes at 6.40am in a European Commission press release announcing that "sufficient progress" has been made in the first phase of Brexit talks.
Minutes later Mr Juncker and Mrs May appear together at a press conference to herald the deal, with the PM declaring it "a hard-won agreement in all our interests". She says the agreement means the rights of three million EU citizens in the UK will be "enshrined in UK law and enforced by British courts", and there will be "no hard border" between Northern Ireland and the Republic.
UK business leaders immediately hail the breakthrough, but former Ukip leader Nigel Farage declares: "We can now move on to the next stage of humiliation."
Mrs Foster says the deal ensures Northern Ireland will "not be separated constitutionally, politically, economically or regulatory from the rest of the United Kingdom". But she warns that there is "still more work to be done" on the border issue.
Just after 8am Mr Varadkar holds a press conference in Dublin and declares the Brexit deal has "achieved all we set out to achieve". But echoing Mrs Foster (and Winston Churchill), he adds: "This is not the end, it is the end of the beginning."