After months of acrimony, Greece clinched a preliminary bailout agreement with its European creditors on Monday that will, if implemented, secure the country's place in the euro and help it avoid financial collapse.
The terms of the deal, however, will be painful both for Greeks and their radical left-led government, which since its election in January had vowed to stand up to the creditors and reject the budget cuts they have been demanding.
Greece needs another bailout, its third in five years, to dig itself from under a mountain of debt and to get its economy back on its feet after a six-year depression. Following months of inconclusive talks, its economy is now teetering on the edge of collapse — banks have been shut for two weeks and daily business has almost ground to a halt amid cash withdrawal limits.
Before it can receive 85 billion euros ($95.07 billion) in loans and support for its banks to reopen, the Greek government will have to pass a raft of austerity measures that include sales tax increases and reforms to pensions and the labor market.
Greece will be on a tight timetable to implement its reforms — a reflection of how little its creditors trust the government to honor a deal. Greek Prime Minister Alexis Tsipras infuriated his European partners last month when he called for a popular vote against economic reforms the creditors has proposed.
The Greek people voted against those proposals, but now face even tougher measures. Syriza's Left Platform, a group of traditionalists in Tsipras's own party, swiftly denounced the agreement as the "worst deal possible ... that maintains the country's status: a debt colony under a German-run European Union."
Both sides in Brussels acknowledged the bitterness that marked their negotiations, which lasted nine hours past a Sunday midnight deadline.
"Trust needs to be rebuilt," said German Chancellor Angela Merkel, adding that with the deal, "Greece has a chance to return to the path of growth."
Stock markets rose sharply in Europe on news of a deal, as it averts the imminent danger of Greece falling out of the euro, an event that would create huge uncertainty European and global markets. The Stoxx 50 index was up 1.6 percent, though the euro was down 1 percent after spiking higher.
Experts, however, noted that Greece's problems are not over.
"This agreement pulls Greece back from the brink of economic chaos but remains far from ensuring its long-term economic viability within the euro zone," says Eswar Prasad, professor of trade policy at Cornell University. "Greece will face many challenges in delivering on the package of reforms it has promised... The Greek economy faces a wrenching period ahead as it copes with economic, social, and political instability resulting from tough fiscal discipline, sweeping reforms, and an eviscerated social safety net."
In a first step toward getting its bailout loans, the Greek government has to pass a set of measures into law by Wednesday.
They include an increase in the sales tax and reform of the pension system. In later weeks, Greece will have to open to competition industries that have long been protected, such as the energy sector. Labor laws will be made more flexible.
If it meets these requirements, Greece will get a three-year rescue program and a commitment to restructure its debt, which is unsustainably high at around 320 billion euros, or around 180 percent of annual GDP.