After a marathon summit, EU President Herman Van Rompuy said that the deal will reduce Greece's debt to 120 percent of its GDP in 2020. Under current conditions, it would have grown to 180 percent.
That will require banks to take on 50 percent losses on their Greek bond holdings - a hard-fought deal that negotiators will now have to sell to individual bondholders.
Van Rompuy also said the eurozone and International Monetary Fund - which have both been propping the country up with loans since May of 2010 - will give the country another euro100 billion ($140 billion). That's slightly less than amount agreed in July, presumably because the banks will now pick up more of the slack.
"These are exceptional measures for exceptional times. Europe must never find itself in this situation again," European Commission President Jose Manuel Barroso said after the meetings.
The question of how to reduce Greece's debt load had proven the sticking point in European leaders' efforts to come up with a grand plan to solve its debt crisis.
But it was just one of three prongs necessary to restore confidence in Europe's ability to pay its debts and prevent the 2-year-old crisis from pushing the continent and much of the developed world back into recession.
The first details of such a plan emerged hours earlier, when European Union leaders announced they would force the continent's biggest banks to raise euro106 billion ($148 billion) by June - partially to ensure they could weather the expected losses on Greek debt.
Van Rompuy also announced that the eurozone would boost the firepower of their bailout fund to about euro1 trillion ($1.4 trillion) in order to protect larger economies like Italy and Spain from the market turmoil that has already pushed three countries to need bailouts.
"We have reached an agreement which I believe lets us give a credible and ambitious and overall response to the Greek crisis," French President Nicolas Sarkozy told reporters as the meeting broke Thursday morning. "Because of the complexity of the issues at stake, it took us a full night. But the results will be a source of huge relief worldwide."
Sarah DiLorenzo and Sylvie Corbet in Paris, Juergen Baetz and Geir Moulson in Berlin, and Raf Casert, Don Melvin and Robert Wielaard in Brussels also contributed to this report.