Eurozone finance ministers meeting in Brussels on Wednesday morning agreed a fresh 10.3 billion euros ($12 billion) in bailout money for Greece avoid bankruptcy.
The 11 hours of talks, which lasted late into the night, also addressed debt relief. The debt relief measures will be phased in progressively, Eurogroup chief Jeroen Dijsselbloem said.
The International Monetary Fund has advocated for some debt relief, arguing Greece's public debt was unsustainable. But some Eurozone finance ministers and Germany have resisted debt relief. Crucially, the debt relief agreement will keep the Fund in the Greek bailout program.
Athens and its creditors have been haggling over reforms and budget cuts for months in order to reach an agreement on the next tranche of money to be released from Greece's third 86-billion-euro bailout.
In July, Greece is due to repay 3.5 billion euros in loans to the European Central Bank (ECB) and the International Monetary Fund (IMF). Funds are also needed to prop up everyday government spending and public sector wages.
The new loans, the latest payment from the 86-billion-euro bailout program agreed to last year, would be conditional on Greece delivering on its reform promises. Greece has been receiving financial aid from other Eurozone countries and the IMF since a bailout agreement in 2010, foreign media reports.