EU leaders reached a landmark €1.82 trillion budget and COVID-19 recovery package early Tuesday morning.
It comes after days of sometimes bitter discussions over the seven-year budget and recovery package which includes jointly borrowing a €750 billion recovery fund to be shared as grants and loans.
Speaking to reporters, European Council president Charles Michel called it a "good deal", stating that "Europe is solid".
European Commission President Ursula von der Leyen, meanwhile, underlined important concessions made in the search for a compromise, saying she regretted the cuts to "modern policies" in research and innovation.
French president Emmanuel Macron called it an "historic day for Europe".
The recovery plan includes €390 billion worth of grants and €360 billion worth of loans due to a compromise with the so-called frugal four, now five, countries — Netherlands, Austria, Finland, Sweden and Denmark.
The recovery fund had originally set €500 billion to be handed out as grants and €250 billion in loans, which was supported and pushed by a close Franco-German alliance.
On Monday, Merkel had reaffirmed her support for "substantial parts of grants" to be handed out to countries most severely-hit by the economic impact of the COVID-19 pandemic.
"That is the answer we need for an exceptional situation," she said, adding: "exceptional situations also require exceptional efforts".
Early Tuesday, Austrian Prime Minister Sebastian Kurz shared a photo of the "frugals", stating that the final package was a "good result for the EU".
Now the deal will have to pass the scrutiny of the European parliament, which will shortly convene a special plenary session.
What had been planned as a two-day summit has become one of the longest in EU history.
Talks were originally planned to end on Saturday, but the effort to broker a compromise pushed leaders to extend their hotel stays.
It has been compared to the Nice summit in 2000, where arguments over treaty changes and enlargement stretched into four days.
The European Council press service tweeted that the 2000 summit in Nice "started at 09h45 am on Thu 7/12 for the 'European Conference' (#EU15 plus accession candidates + others) and lasted until 05h30 am on Monday 11/12."
The latest summit falls just short of the Nice summit record.
Dutch Prime Minister Mark Rutte had provided the strongest opposition to the initial grant money plan — and at one point during the summit was said to be insisting on a cap of €350 billion worth of grants — preferring loans of strict conditions.
He also told reporters that the Frugals "are fighting for clear reforms, if necessary, in all member states. We are fighting to maintain the rebates...We are all negotiating in a very tense situation for Europe, so everyone at any moment can be agitated."
Differences were so great that Sunday's resumption of talks by all 27 leaders together was pushed back several hours as small groups worked on new compromise proposals.
"The actual size of the package in terms of the scale of the package and the balance within the package between grants and loans, that's where significant disagreement still remains, notwithstanding movement yesterday and overnight," said Irish Taoiseach Micheál Martin.
Luxembourg Prime Minister Xavier Bettel said in his seven years’ experience of European meetings he "had never seen positions as diametrically opposed as this.”
"This is really a very, very difficult negotiation because it is not only about this one new set of big money, but it really changes the contours of monetary union," Guntram Wolff, Director of the Bruegel economic think tank in Brussels, told Euronews.
"It’s the first time the EU borrows money to give it as grants to countries. So it's really a game-changer in terms of how this monetary union, how this European Union works."
The summit has seen walkouts and pointed jibes, with most admitting that there were tense moments in discussions. The focus of much of this was on the Dutch Prime Minister, his negotiating stance has earned him the monicker Mr No.
While media narratives of summits usually cast it as a battle that is either won or lost, the political wounds of this summit may cut deeper than before.
"I am more pessimistic about the atmosphere that will remain after that," says Eric Maurice, Head of the Robert Schuman Foundation, Brussels. He explains that other crises will arise post-COVID.
"We see that with every new crisis it is very difficult to be on the same (wave) length, between -of course- north and south, east and west, and now between bigger and smaller countries," he said.
The toxic atmosphere of the discussions has shown a level of mistrust between the current crop of EU leaders, creating rifts that may take time to heal.
Rule of law
One point of contention were calls for the addition of a rule of law conditionality to accessing the funds which could predominantly impact eastern European countries and especially Poland and Hungary.
Warsaw and Budapest have drawn the ire of Brussels over the past couple of years and been condemned by the European Court of Justice over what is seen as attacks on the independence of the judiciary, media freedom and the treatment of asylum seekers in Hungary.
Hungary had threatened to veto the recovery package if such conditionality is added to the recovery package.
But the final agreement, experts have said, was watered down, mentioning that the EU Council "underlines the importance of the respect of the rule of law."
On Sunday, Hungarian Prime Minister Viktor Orbán had told reporters: "What's going on is a little bit strange because there is a 100 per cent agreement on the rule of law.
"If somebody is not ready to accept the rule of law, (they) should leave the European Union immediately. It should not be punished by money or something other than say 'goodbye son, goodbye guys' because this community is based on the rule of law. And we like that approach, it's ok," he said.
For the leaders of countries hardest-hit by the coronavirus economic fallout, mostly around the Mediterranean, there is no time to lose in securing a package to shore up eurozone economies.
A warning came from the EU's budget commissioner that the pandemic is not over. Johannes Hahn tweeted on Saturday that infections may rise in some countries, so it was "high time to reach an agreement which allows us to provide the urgently needed support for our citizens and economies".