By Jan Strupczewski and John Chalmers
The agreement paves the way for the European Commission, the EU's executive, to raise billions of euros on capital markets on behalf of all 27 states, an unprecedented act of solidarity in almost seven decades of European integration.
Summit chairman Charles Michel called the accord, reached at a 5.15 a.m. (0315 GMT), "a pivotal moment" for Europe.
Many had warned that a failed summit amid the coronavirus pandemic would have put the bloc's viability in serious doubt after years of economic crisis and Britain's recent departure.
News of the deal in Brussels saw the euro rise to a fresh four-month high of $1.1470.
"This agreement sends a concrete signal that Europe is a force for action," Charles Michel, a former Belgian PM told a news conference.
French President Emmanuel Macron, who spearheaded a push for the deal with German Chancellor Angela Merkel, hailed it as "truly historic".
Leaders hope the 750 billion euro ($857.33 billion) recovery fund and its related 1.1 trillion euro 2021-2017 budget will help repair the continent's deepest recession since World War Two after the coronavirus outbreak shut down economies.
But in an unwieldy club of 27, each with a veto power, the summit also exposed fault-lines across the bloc that are likely to hinder future decision-making on money as richer northern countries resisted helping out the poorer south.
The Netherlands led a group of 'frugal' states with Austria, Sweden, Denmark and Finland, insisted that aid to Italy, Spain and other Mediterranean countries that took the brunt of the pandemic should be mainly in loans, not in non-repayable grants.
"There were a few clashes, but that's all part of the game," said Dutch Prime Minister Mark Rutte, describing a "warm" relationship with his Italian counterpart Giuseppe Conte.
But Austrian Chancellor Sebastian Kurz said the frugals' negotiating power was here to stay, suggesting Europe's traditional Franco-German engine will face challenges from smaller states banding together.
ALMOST A SUMMIT RECORD
Frictions peaked on Sunday night as Macron lost his temper with the 'frugals', diplomats said, and Polish Prime Minister Mateusz Morawiecki branded them "stingy, egotistic states".
The bickering spun the summit out, making it the EU's second-ever longest, just 20 minutes short of a record set in 2000 in Nice, according to Rutte. "We would have broken the record at 6:05, but we ended at 5.45," he said.
Under the compromise, the Commission will borrow 750 billion euros using its triple-A debt rating, disbursing 390 billion in grants - less than the originally targeted 500 billion - and 360 billion in cheap loans.
Given the difficulties, talk of Europe's 'Hamilton' moment - hailed as such by German Finance Minister Olaf Scholz on Monday in reference to Alexander Hamilton's decision to federalise debts of U.S. states in 1790 - is overblown.
The summit deal does not set the EU on the path towards a U.S.-style fiscal union, although some see it as a first step.
Rutte's negotiations won an "emergency brake" to temporarily stop transfers of money from the recovery fund if an EU state was seen as not meeting reform conditions tied to the money.
The 'frugals' also secured larger rebates from the next multi-year EU budget, a payback mechanism first won by Britain in the 1980s and which France had hoped to phase out after Brexit.
The recovery plan now faces a potentially difficult passage through the European Parliament and it must be ratified by all member states, which will mean a delay getting the funds to economies that desperately need the help now.
(Additional reporting by Reuters bureaux, Writing by John Chalmers and Robin Emmott; Editing by Michael Perry and Jon Boyle)