ANALYSIS: Theresa May ends her week from hell on a high
As Theresa May pounds the streets in her constituency this weekend, she can afford herself a rare smile.
The Prime Minister arrived back in Maidenhead at around 9.30am, fresh off the red-eye from Brussels and basking in her finest achievement as Prime Minister.
That is a pretty low bar, admittedly, but she deserves to take the plaudits where she can get them. Especially after the rollercoaster week she's just had.
After just two hours' sleep, May swept out of Downing Street at 3.30am this morning en route to RAF Northolt, where a military plane was waiting to fly her, Brexit Secretary David Davis and their key officials to the Belgian capital. By then, she already knew the deal was done.
DUP leader Arlene Foster had finally been squared off following two phone calls - one at 9pm last night and the other two hours later - setting out how the Prime Minister planned to deal with the issue of the Irish border. Foster's acquiescence was key, given she had been the one who pulled the plug when May initially thought she had a deal on Monday.
Back then, things seemed very bleak indeed for the PM. Forced to break off a lunch with Jean-Claude Juncker in order to hear Foster's rejection over the phone, her hopes of getting the green light at next week's European Council for EU/UK trade talks to finally begin seemed remote.
Humiliatingly, her plans for a triumphant Commons statement on Tuesday had to be scrapped, while the DUP leader seemed more eager to set out her stall on TV rather than take May's calls.
Even yesterday, the chances of a breakthrough looked slim. One DUP MP told me: "We've got loads of Tories coming up to us saying 'keep going, hang in there'. Theresa's problems aren't with us, they're with her own side."
The first inkling that a deal was in the offing came around 5pm yesterday, when Reuters revealed that European Council president Donald Tusk would make a statement this morning at 6.50.
But last night, No10 were still playing down rumours that May was preparing to make a dash to Brussels. "If there's a lesson to take from this week, it's don't get excited about 'people' briefing in Brussels," said one senior Downing Street source, before adding: "No flight plans."
The drama coincided with the Downing Street staff Christmas party, which was, according to one of the participants, "going on around the Prime Minister". May was also spotted heading for the flat in 11 Downing Street at around 7.30pm. Adding to the slightly surreal nature of the proceedings, a rather loud party for the children of political journalists - complete with a magician and a live rabbit - was going on in the next room.
A few hours later, the DUP were still dismissing the notion that an agreement was imminent. Shortly after 10pm, one source said: "Our team has more work to do tomorrow."
We now know that they meant 'tomorrow' in its most literal sense ie after midnight. An email from Downing Street at 4.57am confirmed that the deal was on: "The Prime Minister is travelling to Brussels for further meetings on the Brexit negotiations."
Within an hour of landing, and after the briefest of working breakfasts, May and Juncker confirmed to the media that the deal was done. You can read all the details of the 15-page joint report HERE.
The PM now has to figure out a way of selling the document to her own deeply-divided party, while also keeping the DUP on board and getting the Government's Brexit legislation through the Commons. All of this will be fiendishly difficult. But those are battles for another day.
One No10 source said: "The Prime Minister had a tough day yesterday. There was a lot of hard work to be done and a lot of conversations to be had, but we're pleased we've got to the place we've got to this morning."
Of course, this isn't the end. It isn't the beginning of the end, or even the end of the beginning. But it's a start. And for Theresa May, that's as good as she could have hoped for this time yesterday.