European Union leaders reached agreement on the first ever cut in their common budget on Friday after 24 hours of talks, seeking to placate millions at home struggling through government cutbacks and recession.
The expected deal met the demands of northern European countries such as Britain and the Netherlands that wanted belt-tightening, while maintaining spending on farm subsidies and infrastructure to satisfy the likes of France and Poland.
It will be the first net reduction to the EU's long-term budget in the bloc's history, representing a decrease of around 3 percent on the last budget and shaving spending in areas from infrastructure to administration and scientific research.
Last-minute haggling over precisely how to divide up the 960 billion euros ($1.3 trillion) to be spent between 2014 and 2020 drew out the process, before Herman Van Rompuy, the president of the European Council and chairman of the summit, announced that a definitive deal had been struck among the leaders.
"Deal done!" he said in a message posted on Twitter, saying that the agreement had secured a budget until the end of the decade. "Worth waiting for," the message added.
The deal must now be approved by the European Parliament, where leading legislators have already expressed opposition. Securing parliamentary approval is likely to take several months and is far from guaranteed.
After negotiating through the night, leaders broke up for a rest, allowing German Chancellor Angela Merkel to swap her green jacket for a lilac one, and returned to address a list of questions, including whether to reduce the burden on the Netherlands and how to satisfy smaller countries such as Romania and Bulgaria.
Mindful of their restive voters, Northern European states were adamant that as they shrink spending at home and grapple with the aftermath of the global financial crisis, the European Union had to do the same.
Around 12 billion euros was cut from the last budget proposal, made at a summit in November.
While vast as a headline figure, in annual terms the budget amounts to just 1 percent of total EU economic output.
The cuts agreed on Friday fell mainly on spending for cross-border transport, energy and telecoms projects, which were reduced by more than 11 billion euros. Pay and perks for EU officials - a top target for Britain - were lowered by around 1 billion euros, officials said.
Spending on agriculture was spared further cuts, and there was an increase of about 1.5 billion euros on rural development over the seven years, satisfying France, Italy and Spain.
Even with a deal, around 40 percent of the spending will still be dedicated to farming, something that frustrates many northern European states, which want a more dynamic budget.
At the same time, officials said money had been set aside for growth-stimulating measures, for research and for structural funds to flow to countries worst hit in the economic crisis, including Greece, Ireland, Portugal and Spain.
There were also stipulations for green investment and 6 billion euros for a fund to combat youth unemployment via apprenticeships in hard-hit countries.
The deal still faces further hurdles, not least at the bloc's parliament.
"The European Parliament will not accept this deficit budget if it is adopted in this way. That is certain," the parliament's president Martin Schulz said.
In recent weeks, Van Rompuy has been in touch with every EU leader to assess where the contours of an agreement may lie.
But reaching a deal was never going to be a simple question of cutting the total, since the budget also involves delicate negotiations over rebates - amounts countries get reimbursed after they have made contributions.
Denmark won a rebate of around 130 million euros a year, but other rebates were trimmed or modified. The Czech Republic was among a small group of countries that fought for final extra distributions, mostly for funds to build infrastructure.
The EU calculates two budget numbers: a headline 'commitments' figure that sets a ceiling on how much can be paid out, and a lower 'payments' figure that indicates what will actually be spent.
The baseline payments figure in the framework agreed on Friday was expected to be 908 billion euros, a figure low enough to convince Britain, which focuses on payments rather than commitments, that it was getting a satisfactory deal.