Eighteen hours after arriving at a summit to try to win "at least a freeze, at best a cut" in European spending for the next seven years, David Cameron looked close to being able to return to London later today with a actual reduction - reflecting, as he has insisted, belt-tightening in public sector spending at home.
The marathon talks began with a total of six hours of behind-the-scenes bartering between various leaders over figures.
When the 27-way summit finally got under way, the opening bid presented to the leaders for agreement amounted to a budget proposal of 913 billion euros (£778 billion) for 2014-2020.
Twelve hours of discussions, with breaks for revised proposals and repeated number-crunching, produced a new figure as day dawned of an estimated 908 billion euros (£773 billion) - a cut of five billion euros.
Last night British government sources had insisted that Mr Cameron wanted to see "tens of billions" of cuts extra on the opening bid.
But the estimated outcome would give him a deal enabling him to claim that his basic demands that Europe at least nods towards the austerity being endured by national treasuries have been met.
However, summit officials cautioned that "nothing is agreed until everything is agreed" and that the calculators were still out going through the details to finalise the exact savings areas.
One official said no final proposed figure had actually been presented to the leaders - but the shape of a deal was clear from the various suggestions set out under many different EU spending headings which national delegations were analysing during the night.
Various EU leaders snatched some sleep during breaks in formal summit sessions during the night, leaving officials sitting in.
Mr Cameron arrived yesterday, declaring: "The numbers are much too high. They need to come down - and if they don't come down there won't be a deal.
"The European Union should not be immune to the sorts of pressure we have to reduce spending, find efficiencies and spend wisely - what we are all doing."
But an important comparison for Mr Cameron when he returns to the Commons is between the final figures agreed today and the cost of the total budget for the current seven-year spending period, which the new deal will replace.
That comparison should give him enough scope to claim success - although Britain's own national contribution to the overall final figure will come under close scrutiny too.
And critics will be looking to see if the Prime Minister has won the cutbacks in the pay and perks of the EU civil service which he has been calling for, as well as reductions in bloated EU farm spending, which currently absorbs 40% of the entire Euro budget.
Earlier on HuffPost: