It took more than 24 hours, talking through most of yesterday and last night, but they have done a deal. The budget has been set for the next decade or so, and for the first time in the European Union’s history it is smaller than the one that preceded it. A victory for David Cameron, certainly, but perhaps more accurately a victory for northern Europe over the south.
As so often, it was Germany that had the decisive say. If Angela Merkel had sided with Francois Hollande of France, Cameron would have either had to veto a deal or come home to face the anger of his backbenchers. In the event it was London that managed to win over Berlin - to the evident anger of the French - and the southern coalition of France, Italy and Spain had little choice but to give way.
There was a last-minute hitch (isn’t there always?) as Paris tried to add just a few billion more to the spending totals, but no one was giving any ground.
The Commission had originally demanded a budget of €988 billion to spend over seven years. What they will get is around €908 billion.
Cameron had been determined to restrict the EU budget to 1 percent of gross national income. In the event the figure is even less, 0.95%.
There remains one more hurdle: the European Parliament can throw out the budget, and are threatening to do so.
There is even talk that they will hold a secret ballot in order that MEP’s will not come under pressure from their home capitals to vote in favour.
This may happen, but if it does it is a battle that the UK Government will relish, demonstrating - in their view - all the problems with the way Europe is run.
The deal should go down well in Westminster, despite the irony that even under this deal the amount that the UK pays to Brussels will actually rise slightly.
That is because of a deal done by Tony Blair in which more spending will be directed towards Eastern Europe, and the British rebate will not apply to any of that money.
This, as far as London is concerned, is unfortunate but unavoidable, and it’s likely that most of Cameron’s backbenchers will see it the same way.
When the smoke clears, the question still to be answered is whether this marks the end of the ‘Franco-German motor’ that has dominated EU business for so long.
The French are genuinely surprised that Angela Merkel has turned on them in this way. They aren’t used to it and they don’t like it. Indeed they seem to now be living in fear of a London-Berlin axis taking over.
However unlikely that may be, even hearing the French discussing such a possibility may give David Cameron some quiet satisfaction at a job well done.