European Union leaders agreed the framework of a new long-term budget on Friday after 15 hours of through-the-night negotiation, laying the ground for 960 billion euros of spending on agriculture, aid and scientific research in the years ahead.
The agreement, which EU officials said would only be finalised later on Friday, strikes a tight balance between the demands of northern European countries such as Britain and the Netherlands that wanted a belt-tightening budget, and countries in the south and east such as France and Poland that wanted spending on farming subsidies and much-needed infrastructure.
"We feel pretty confident that we have the framework for a deal," said one EU official speaking on condition of anonymity moments after leaders agreed the outlines. "The deal is not completely finalised, but we feel sure it will be done today."
Several diplomats and other senior officials from a number of EU member states confirmed the framework agreement.
The officials said around 12 billion euros would be cut from the last budget proposal, made at a summit in November when agreement eluded leaders, bringing the headline ceiling for spending down to 960 billion over the full 2014-2020 plan.
That represents a decrease of around three percent on the last multi-annual framework - the first time a long-term spending plan has seen a net reduction in the EU's history.
While vast in headline terms, in annual terms the budget appropriation amounts to only around 140 billion euros, equivalent to just 1 percent of total EU economic output.
The cuts agreed on Friday fell mainly on a new fund for cross-border transport, energy and telecoms projects, which was cut by more than 11 billion euros, and on pay and perks for EU officials - a top target for Britain - which were cut 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 others.
As well as the deal needing to be signed off by all EU leaders later on Friday, it must be approved by the European Parliament, an obstacle that could prove difficult. The European Parliament president has said he will not accept excessive cuts.
Ahead of the summit, France and Britain appeared at sharp odds over the headline numbers, with Denmark, the Netherlands and Sweden lining up on Britain's side and Italy, Spain, Poland and others allied with France. Germany was left in the middle.
Thursday's summit got off on a poor footing after French President Francois Hollande failed to turn up to a meeting with British Prime Minister David Cameron, German Chancellor Angela Merkel and Herman Van Rompuy, the European Council president who chairs EU summits.
Britain interpreted Hollande's absence as a snub, while French officials said no invitation had been made. The diplomatic contretemps put Paris and London at odds, contributing to frosty early negotiations that at one point late on Thursday appeared set to break down completely.
Even if a final deal is struck on the seven-year framework, around 40 percent of the spending will still be dedicated to farming and regional development, 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 was set aside for a fund to combat youth unemployment via training and apprenticeships in countries such as Spain, Greece, Portugal and Ireland.
In recent weeks, Van Rompuy has been in touch with every EU leader to assess where the contours of an agreement may lie. He had said that he would only call a summit if he saw sufficient "convergence" among the countries to make a deal possible.
In November, he began the talks by reducing the European Commission's original budget proposal by around 80 billion euros, bringing the headline figure down to 972 billion.
Thursday's summit was supposed to resume on the basis of that figure, although it 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.
In the end, the rebate system was left largely untouched, and Denmark won a rebate of around 130 million euros a year.
Northern European states, including Britain, Denmark and the Netherlands, were adamant that at a time when they are trying to cut budgets at home to bring finances into balance, it was incumbent on the EU to pursue a similar objective.
Because of a difference in the way the budget is calculated, there are two numbers - both the headline 'commitments' figure which sets a cieling 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 908.4 billion euros, a figure low enough to convince Britain, which focuses on payments rather than commitments, that it was getting a satisfactory deal.
(Addtional reporting by Justyna Pawlak, John O'Donnell and Teddy Nykiel; writing by Charlie Dunmore and Luke Baker)