Eurozone finance ministers have reached a deal to provide Greece with a 130 billion-euro ($173 billion) bailout to save the country from bankruptcy.
The deal aims to bring Greece's debt down to 121 percent of gross domestic product by 2020, from more than 160 percent now.
Reportedly as a result of the late-hour negotiations, private bondholders will be asked to take bigger losses on their holdings.
The chairman of the Eurogroup, Jean-Claude Juncker, announced the deal after the marathon talks late into the night in Brussels.
"After a meeting of at least, I think, 13 or 14 hours, we have reached a far-reaching agreement on Greece's new program and private sector involvement that will lead to a very signficant debt reduction for Greece," Juncker said.
Greece desperately needs another rescue package if it is to avoid a default next month when a euro14.5 billion bond issue comes due.
Greece's crippling indebtedness comes after five straight years of recession.
International Monetary Fund (IMF) chief Christine Lagarde praised the “considerable efforts” Greece had done so far to address the crisis. Lagarde, who was involved in the negotiations, reportedly predicted Greece would be allowed the "space...to restore its competitiveness."
The Greek parliament has approved a series of austerity measures worth 3.2 billion euros, along with reforms aimed at getting its economy back on track, as a precondition for the bailout.
The austerity measures are deeply unpopular in Greece and have prompted an outbreak of violent street demonstrations in Athens.
There also are concerns among the richer eurozone countries about whether future governments in Athens would continue to enforce the austerity measures that are part of the deal for a second bailout package.
Greece's debt totals some 350 billion euros.
A previous international rescue plan for Greece of around 110 billion euros in 2010 failed to ward off the current crisis.