"It is a historic moment".
Eurozone President and Portuguese Finance Minister Mario Centeno said at a press conference shortly after the meeting "after eight long years Greece will finally be graduating from its financial assistance".
European Union officials said on Thursday they were confident of a deal.
Under the agreement reached by euro area finance ministers in order to ensure the sustainability of the Greek debt load after the expiry of the third bailout this August, Greece will receive a 10-year extension for the repayment of its European Financial Stability Facility (EFSF) loans and an additional 10-year grace period for interest payments.
The eurozone creditors also agreed to disburse 15 billion euros ($17.5 billion) to ease the country's exit from its programme. For more details of Greece's outstanding debt, check this graph: https://tmsnrt.rs/2JYhBYS.
Greece's government borrowing costs have dropped and the stock market is rallying on news that the country's creditors have agreed to debt relief measures that pave the way for an end to the nation's eight-year bailout program in two months.
This will provide Greece with a financial cushion of 24 billion euros, with which Athens could pay off its debts in the next 22 months without having to resort financing on the market to support itself.
"It took a bit longer than we expected, but ended in a very good way", Greek Finance Minister Euclid Tsakalotos said.
The money will come from profits made by euro zone central banks on their holdings of Greek bonds that will gradually mature over the next four years.
"Mooted debt relief measures only push the problem further into the future and Greece will remain vulnerable to a renewed downturn in its own economy or a flare-up in market fears about the euro-zone more generally", Capital Economics, a research firm, said in a note.
"But we should collectively find a way to alleviate the debt, either by extending the maturities of existing loans or by buying back the most expensive ones", he said.
The IMF also welcomed the debt agreement, saying it makes Greece's debt sustainable in the medium term and facilitates Greece's access to the markets.
"The Greek crisis ends here tonight", said EU Economic Affairs Commissioner Pierre Moscovici.
Unlike the first two Greek bailouts, the International Monetary Fund did not join the latest Greek program with it its own loans, but will continue to monitor Greece's performance alongside the euro zone.