Leftist Prime Minister Alexis Tsipras agreed to tough reforms after 17 hours of gruelling negotiations in return for a three-year bailout worth up to 86 billion euros (USD 96 billion), Greece's third rescue programme in five years.
"EuroSummit has unanimously reached agreement. All ready to go for ESM (eurozone bailout fund the European Stability Mechanism) programme for Greece with serious reforms and financial support," EU President Donald Tusk said.
The new rescue for Athens is the country's third since 2010 and came after a bitter six-month struggle following Tsipras's election in January that put Greece's membership of the eurozone in the balance.
Greek banks have been closed for nearly two weeks and there were fears they were about to run dry due to a lack of extra funding by the European Central Bank, meaning Athens would have had to print its own currency and effectively leave the single currency.
"Grexit has gone," European Commission President Jean-Claude Juncker said, ruling out the threat of Greece leaving the single currency, which could potentially destablise not only the euro but the world economy.
Tsipras insisted the deal was good for Greece despite the fact that the harsh terms were near identical to those rejected by Greeks in a referendum just one week ago.
"We fought a righteous battle to the end," a smiling Tsipras said as he left the talks, adding that despite the deal's harshness the "great majority of Greek people will support this effort."
Asian markets rose on news of the debt deal, after a torrid few weeks while traders waited for an accord. The austerity-pushing German Chancellor Angela Merkel, Europe's most powerful leader, said the situation for Athens however remained daunting, with success not guaranteed.
"The road will be long, and judging by the negotiations tonight, difficult," Merkel told reporters.
Europe's first step will be to push the deal through several national parliaments, many in countries that are loath to afford Greece more help.
Athens will now have to rush through new tough reform laws by Wednesday, according to the document agreed on by Tsipras and his eurozone counterparts.
Greece has to introduce harsh conditions on labour reform and pensions, VAT and taxes, and measures on privatisation, it added.
Under the agreement it will also park assets for privatisation worth up to 50 billion euros (USD 56 billion) in a special fund. The money in that fund will then be used to recapitalise Greece's cash-starved banks.

Latest News  from Business News Desk