Eurogroup chairman Jeroen Dijsselbloem said at a press conference in Brussels that Greece had given an “unequivocal commitment to honour their financial obligations” to creditors.
On Monday Greece is to present a list of reform measures, which must then be approved by the major creditors — the EU, the European Central Bank and the International Monetary Fund. The national governments of the 19 eurozone members must also ratify the terms.
Greece has agreed not to take any measures that might prevent it from meeting repayment terms, and to fully fund any new spending measures from internal funds.
Those commitments give EU lenders a measure of control over Greek policy making, but they also give the new government breathing room.
"Tonight was a first step in this process of rebuilding trust," Dijsselbloem said at a news conference. "We have established common ground again to reach agreement on this statement."
Greece had asked for a six-month extension of the bailout while it worked to turn around its moribund economy, but EU members insisted on four months.
The deal followed make-or-break talks between Greece and eurozone finance ministers.
They began more than three hours late, delayed as German Finance Minister Wolfgang Schauble and his Greek counterpart Yanis Varoufakis worked out a fresh compromise text.
The main task for newly elected Greek Prime Minister Alexis Tsipras will be to get the Greek electorate and radical members of his Syriza Party to accept the terms, analysts said.
Tsipras swept to power last month on a pledge to ease the budget belt-tightening and reorganize the €240 billion ($340 billion) bailout debt.
Will the Greek's like the deal?
Analysts in Athens are already describing the concessions made by the Greek government as "politically poisonous."
Any reforms will have to be endorsed by the Greek parliament.
The talk of an apparent breakthrough has helped the euro rally and U.S. stock markets to turn positive.
The Greek government was effectively just a week away from having to fend for itself, as its debt deal with the EU expires Feb. 28.
Friday's emergency Eurogroup meeting, which included International Monetary Fund managing director Christine Lagarde and European Central Bank president Mario Draghi, is the third in just over a week. Financial markets have been gripped by the precarious negotiations.
"It has been a laborious but eventually constructive process," Lagarde said after the meeting.
Without any further support, Greece faced defaulting on its debts and an exit from the euro, a scenario that would likely devastate the Greek economy, at least in the short-term, and generate renewed uncertainty for the global economy.
Suggest a correction