Euro zone finance ministers agreed in principle on Friday to extend Greece's financial rescue by four months, averting a potential cash crunch in March that could have forced the country out of the currency area.
The deal, to be ratified once Greece's creditors are satisfied with a list of reforms it will submit next week, ends weeks of uncertainty since the election of a leftist-led government in Athens which pledged to reverse austerity.
"Tonight was a first step in this process of rebuilding trust," Jeroen Dijsselbloem, chairman of the 19-nation Eurogroup, told a news conference. "We have established common ground again to reach agreement on this statement."
The agreement, clinched after the third ministerial meeting in two weeks of acrimonious public exchanges, offers a breathing space for the new Greek government to try to negotiate longer-term debt relief with its official creditors.
But it also forced radical young Prime Minister Alexis Tsipras into a major climbdown since he had vowed to scrap the bailout, end cooperation with the "troika" of international lenders and roll back austerity.
European Union paymaster Germany, Greece's biggest creditor, had demanded "significant improvements" in reform commitments by Athens before it would accept an extension of euro zone funding.
The two main combatants around the table put a radically different gloss on the result.
"Being in government is a date with reality, and reality is often not as nice as a dream," German Finance Minister Wolfgang Schaeuble told reporters, stressing Athens would get no aid payments until its bailout program was properly completed.
"The Greeks certainly will have a difficult time to explain the deal to their voters," the conservative veteran said.
Greek Finance Minister Yanis Varoufakis said the talks had shown elections could bring change to Europe. He insisted he had averted "recessionary measures" and said the government still hoped to raise the minimum wage and rehire some public sector workers.
"Nobody is going to ask us to impose upon our economy and society measures that we don't agree with," Varoufakis said.
The euro rebounded against the dollar and global equity markets surged to record closing highs while Greek government bond yields fell on optimism for a debt deal.
The accord requires Greece to submit by Monday a letter to the Eurogroup listing all the policy measures it plans to take during the remainder of the bailout period.
If the European Commission, the European Central Bank and the International Monetary Fund are satisfied, euro zone member states will ratify the extension, where necessary through their parliaments.
Euro finance ministers may sign off on the deal on Tuesday via a teleconference. However, if there are doubts they would reconvene in Brussels, officials said, a conditions insisted upon by Spain, whose government also faces a radical leftist insurgency at an election later this year and is keen that Tsipras gets no special treatment.
Irish Finance Minister Michael Noonan voiced caution, telling reporters: "It's an important first step that we hope will lead to a successful second step on Monday night/Tuesday morning, but then of course there's a third step with ratifications in parliament."
With the 240 billion euro EU/IMF bailout program due to expire in little more than a week, Tsipras had requested a six-month extension of a loan agreement but Germany and its allies objected to the initial formulation of the request.
Greece's partners insisted on the shorter period and tied further disbursements to a satisfactory review at the end. They also obliged Athens to commit to fully funding any new spending measures and obtaining approval from its lenders.
The ECB said there would be no need for Greece to impose capital controls restricting cash withdrawals after the deal.
An ECB source said the bank's governing council was ready to resume accepting Greek government bonds as collateral for lending once necessary steps were taken for the extension and the bank determined there was a "great likelihood" that Greece would achieve a "positive conclusion" to its rescue program.
Trust in short supply
The complex document was crafted in preliminary talks among Varoufakis, Schaeuble, Dijsselbloem and IMF Managing Director Christine Lagarde.
Finance ministers from other euro zone states insisted on more guarantees that Greece would meet the bailout's strict conditions on budget discipline and economic reforms.
Tsipras had a long telephone call with Germany's Angela Merkel on Thursday and has spoken repeatedly to the leaders of France and Italy in the search for a solution that allows his radical government to fulfill election promises.
Euro zone officials said Greece's track record and the combative behavior of its new leaders had undermined their confidence in whether Athens would deliver what it agrees to in talks with the other countries sharing the euro.
That drove ministers to make Greece hand over custody of nearly 11 billion euros in aid earmarked for stabilizing its banks to the euro zone's rescue fund.
"We wanted to make sure that the ... money for Greek bank recapitalization is for that purpose, not for recapitalization of the government," Dijsselbloem said.
Some pointed comments were directed at Varoufakis, an outspoken Marxist economist and blogger, and his casual style. "Even hardliners like us have to give the benefit of the doubt to a communist in a Burberry scarf," an official of one hawkish European country joked.
Adding to pressure to reach a deal, Greek savers have withdrawn their money from the banks at an accelerating pace despite government assurances that there is no plan to introduce capital controls to stem the outflows.
Deposit outflows rose to a total of over 1 billion euros in the past two days, some of the highest daily levels seen this year, three senior banking sources told Reuters.
Greeks were nervous before a three-day weekend, given memories of capital controls imposed in Cyprus in 2013 over a long weekend, a senior banker said. Monday is a public holiday.