European leaders were inching towards a deal in the early hours of Friday morning that would see the first cut in the EU's budget in its 56-year history.

David Cameron, who had demanded a freeze in real terms in the near-€1tn budget, was planning to claim victory after the European council president proposed a €34.4bn cut over the next seven years.

Herman Van Rompuy finally tabled his budget proposals in Brussels at 6am after a night of haggling at the EU summit that was described by one official as like a "bazaar".

Shortly before 6.30am, the EU's 27 leaders filed into the council chamber to debate Van Rompuy's proposal to cut the "payment ceiling", likened to a credit card limit, for the next seven-year budget from €942.8bn to €908.4bn. Van Rompuy proposed cutting the higher "commitment ceiling" from €993.6bn for the last budget from 2007-13 to €960bn for 2014-20.

Dalia Grybauskaite, the Lithuanian president who was the EU's budget commissioner during the last negotiations in 2005, indicated at around 4am that the EU was on the verge of agreeing its first budget cut. The EU has agreed seven-year budgets since 1993.

"It looks quite difficult still, because first time really we do see the chances for real budget cut, it was never been before," the president said. "Of course it is difficult for some member states, it is difficult for parliament to accept, and why we're probably in so, so long talks."

The moves towards a deal came after scratchy negotiations that saw President François Hollande of France dig in his heels against the British prime minister's drive to slash the EU budget in Brussels on Thursday. He stayed away from a meeting with the prime minister and Chancellor Angela Merkel of Germany aimed at forging a compromise.

Van Rompuy had planned to table a "negotiating box" containing his proposed numbers at around 3pm on Thursday. But he held back while he conducted negotiations with member states before and after a dinner session on Thursday night.

As Van Rompuy continued his negotiations past midnight and into the early hours with individual member states, some leaders were left to kick their heels. Cameron and Merkel were understood to have slept on sofas in their delegation rooms.

At 3.30am, Elio Di Rupo, the Belgian prime minister, went into the press bar to eat a sandwich and forecast hours of negotiations.

One EU diplomat complained that Van Rompuy had adopted crude tactics in which he bought off individual member states with "gifts" while cutting EU-wide infrastructure projects such as the Connecting Europe initiative. "Growth has been the victim of the bazaar," the source said.

Hollande had made clear he wanted to challenge Britain when he led a troika of France, Italy, and Spain apparently resolved to resist Downing Street. Cameron met Merkel and the two EU presidents, José Manuel Barroso and Van Rompuy, to explore the potential for agreement on Thursday evening. Hollande was expected to attend the meeting, which went on for more than an hour. When he did not turn up, Van Rompuy, chairing the summit, repeatedly phoned the French leader to summon him to the negotiation.

"Hollande was not even answering his mobile," said a senior EU official. "The French are playing tough, very tough, more so than in November," when a previous summit foundered on Cameron's insistence on cutting €30bn from the proposed budget.

Despite the Anglo-French clash there was consensus on the need for cuts. "The question is how much," said the Latvian prime minister, Valdis Dombrovskis.

Hollande said this week that €960bn was his bottom line. And going into the summit he said he would question Britain's contested budget rebate.

"It's got to be possible to find an agreement," the French president said. "If certain [countries] are unreasonable I'll try to reason with them but only up to a point … we need to have a little clarity in the rebates, cheques and refunds given to some and not to others and certainly not to France."

Cameron declared that the spending cuts taking place across the different countries had to be replicated in the EU budget.

"The numbers are much too high," he said. "They need to come down – and if they don't come down there won't be a deal."

To complicate the matter further, Britain is insisting on a different criterion for determining the budget.

The figures initially presented by Van Rompuy in November referred to pledges or "commitments" in the project planning for seven years from 2014. Britain uses a different yardstick: that of "payments", referring to the money actually spent, which usually comes out lower. In the seven years until now the gap between the two was €50bn. Under Van Rompuy's new proposals the gap is €51.6bn for the next budget round.

Downing Street is demanding the lower figure be taken as the cap on what may be spent. If there is a deal it looks as though it will be finessed by using both sets of figures to enable conflicting sides to claim victory from very different positions.

"They will play on the difference between commitments and payments. That will allow France and Italy to claim they have defended their positions and Britain to claim they won," said an EU official.

Another official involved in drafting the proposed deal said: "There's always a gap between commitments and payments. There will be a gap. That's normal."

The overall budget has to be approved by the European parliament. Martin Schulz, the president of the parliament, made clear he was uneasy with Van Rompuy's plans when he raised concerns about a structural deficit in the EU budget.

"The [budget] in the form currently being proposed, however, would turn what is already a legally highly questionable trend into a structural deficit," he told EU leaders.

Even if agreement were reached on the headline figure, the big fight is likely to be over how to carve up a smaller cake. National and Brussels lobbying will press various claims for farm subsidies, structural funds for the poorest countries and regions, salaries, staffing and administration of the EU institutions, a new kitty aimed at getting the young back to work in areas of the highest unemployment, and infrastructure, broadband, and research investment aimed at spurring growth.

A particular target of the Cameron campaign is the cost of running and staffing the EU, which takes up a mere 4% of the overall budget. The prime minister is calling for savings of €7bn here, by shaving 10% off the salaries bill, curbing special tax rules for EU staff, reducing pensions benefits and altering the system of automatic promotions. It is understood that Van Rompuy is proposing a cut of around €2bn in the administration budget.

The summit's draft conclusions show the scale of the prime minister's success by stressing the need for restraint. The draft conclusions say the budget must act as a catalyst for growth but then add: "As fiscal discipline is reinforced in Europe, it is essential that the future Multiannual Financial Framework [the seven-year budget] reflects the consolidation efforts being made by member states to bring deficit and debt onto a more sustainable path. The value of each euro spent must be carefully examined."

Critics of Britain will say that Cameron has not achieved a budget of €886bn set by Britain in 2011. UK officials say the government gave this figure based on EU spending in 2011 multiplied by seven years. Since 2011 spending has increased, making the comparison irrelevant.