The eurozone and IMF saved Greece from bankruptcy on Tuesday in a re-drawn rescue that Greek leaders said marked a new beginning for a country facing further austerity in the midst of recession.
The deal brought forth a compromise by the IMF, an admission that Greece will need help with its debt for years, removes the imminent risk of default, and minimises the chances that the country might have to leave the eurozone.
The accord struck in the early hours of Tuesday after 13 hours of talks marks a "new day" for Greece, Prime Minister Antonis Samaras said, but protests against austerity measures continued in Athens.
With the deal Greece has "ensured its place in the euro," Samaras added.
On financial markets, the euro initially rose in relief at the new breathing space for Greece, but later pulled back. Stocks posted modest gains.
The deal came in the form of approval for the latest slice of rescue funding to pay current bills, already agreed but tied to a new round of deep budget measures, and a new look at the huge mountain of accumulated debt.
Former prime minister Evangelos Venizelos, now head of the Socialist PASOK party part of the ruling coalition, described the deal as "a new beginning" for Greece.
But Alexis Tsipras, head of the leftist opposition party Syriza, called the deal a "non-solution, which isn't a viable plan for our country" whose economy continues to contract under the effect of austerity measures.
Several thousand municipal workers and university staff protested against job cuts, spending cuts and tax rises that the government has implemented to get the rescue funds.
European Central Bank President Mario Draghi said that Greece must still meet a series of agreed conditions but "the decision will certainly reduce the uncertainty and strengthen confidence in Europe and in Greece."
Eurozone finance ministers agreed in principle to begin transferring in December 43.7 billion euros ($57 billion) so that the country does not default at around the end of the year.
They also adopted a new arrangement with the International Monetary Fund, a party to eurozone bailout packages, to slice more than 40 billion euros by 2020 from the debt owed by Greece.
"We have laid the foundations to ensure that Greek debt, the most tortuous and destabilising problem facing the country, has become manageable," Samaras said in a television address.
German Finance Minister Wolfgang Schaeuble will present the package to German lawmakers on Thursday and the opposition leader said he would not stand in the way of a deal to keep Greece in the eurozone.
The techniques to reduce Greece's debt will begin with a EU-aided buyback by Greece of old debt that has fallen in value on commercial money markets. National central banks across the eurozone will forego profits on holdings of Greek debt which has slumped in value.
Interest rates due to eurozone creditors will also be trimmed or deferred -- Ireland and Portugal can now be expected to demand the same -- while maturity dates will be pushed back by years.
The IMF is pushing for a so-called "haircut" or write-down of debt by eurozone partner governments in the way banks wrote off most of the loans due to them earlier this year, but Germany is against this ahead of a general election next year.
But other Triple A-rated states have said they would "not exclude" the possibility of a write-down of debt from 2015 onwards.
The IMF in particular was held back by one of its principles that it should not lend if there is no medium-term prospect of debt falling to sustainable levels, but the problem of who will eventually carry the cost of the debt is a problem for the entire eurozone.
IMF head Christine Lagarde said: "The IMF wanted to make sure the euro partners would take the necessary actions to bring Greece's debt on a sustainable path". She added: "I can say today that it has been achieved."
Jonathan Loynes, chief European economist at Capital Economics, said the latest Greek rescue deal buys the country a bit more time.
"But unless the economy stages a miraculous recovery, the rest of the eurozone will soon be forced to make much more difficult decisions over just how far it is prepared to go to keep Greece inside the euro," he said.
In its latest forecasts published on Tuesday, the OECD expects Greece's economy to contract by 6.3 percent this year, by 4.5 percent next year and 1.3 percent in 2014.
Europe's main stock markets posted modest gains, with London's FTSE 100 index of leading companies up 0.22 percent, Frankfurt rising 0.55 percent and Paris edging up 0.03 percent.
The euro rose briefly above $1.30 in Asian trading for the first time for about a month, but later fell back to $1.2938, down from $1.2971 late on Monday.
Government bond yields of Greece and other peripheral eurozone states, an indication of investor perception of risk, fell.
The yield on Greek 10-year bonds fell to 16.249 percent from 16.507 percent on Monday.
The biggest fall concerned 10-year Portuguese bonds for which the rate fell to below 8.0 percent, to 7.749 percent from 8.022 percent on Monday.
Spanish 10-year yields also fell to 5.520 percent from 5.620 percent, and for Italy to 4.726 percent from 4.754 percent.
At BNP Paribas bank, bond strategist Patrick Jacq said that "in general terms, investors can again have confidence thanks to this agreement."
Fitch ratings agency said the deal "eases the immediate threat of a Greek sovereign default or eurozone exit".
It said the deal "could help put Greece's sovereign debt on a sustainable footing" although it warned key questions remain to be answered about how it will work and that implementation risk is high.