BRUSSELS (Reuters) - The Greek government and financial markets were cheered on Tuesday by an agreement between euro zone finance ministers and the International Monetary Fund to reduce Greece's debt, paving the way for the release of urgently needed aid loans.
The deal, clinched at the third attempt after weeks of wrangling, removes the biggest risk of a sovereign default in the euro zone for now, ensuring the near-bankrupt country will stay afloat at least until after a 2013 German general election.
"Tomorrow, a new day starts for all Greeks," Prime Minister Antonis Samaras told reporters at 3 a.m. in Athens after staying up to follow the tense Brussels negotiations.
After 12 hours of talks, international lenders agreed on a package of measures to reduce Greek debt by more than 40 billion euros, projected to cut it to 124 percent of gross domestic product by 2020.
In an additional new promise, ministers committed to taking further steps to lower Greece's debt to "significantly below 110 percent" in 2022.
That was a veiled acknowledgement that some write-off of loans may be necessary in 2016, the point when Greece is forecast to reach a primary budget surplus, although Germany and its northern allies continue to reject such a step publicly.
Analyst Alex White of JP Morgan called it "another moment of ‘creative ambiguity' to match the June (EU) Summit deal on legacy bank assets; i.e. a statement from which all sides can take a degree of comfort".
The euro strengthened, European shares climbed to near a three-week high and safe haven German bonds fell on Tuesday, after the agreement to reduce Greek debt and release loans to keep the economy afloat.
"The political will to reward the Greek austerity and reform measures has already been there for a while. Now, this political will has finally been supplemented by financial support," economist Carsten Brzeski of ING said.
To reduce the debt pile, ministers agreed to cut the interest rate on official loans, extend the maturity of Greece's loans from the EFSF bailout fund by 15 years to 30 years, and grant a 10-year interest repayment deferral on those loans.
German Finance Minister Wolfgang Schaeuble said Athens had to come close to achieving a primary surplus, where state income covers its expenditure, excluding the huge debt repayments.
"When Greece has achieved, or is about to achieve, a primary surplus and fulfilled all of its conditions, we will, if need be, consider further measures for the reduction of the total debt," Schaeuble said.
Eurogroup Chairman Jean-Claude Juncker said ministers would formally approve the release of a major aid installment needed to recapitalize Greece's teetering banks and enable the government to pay wages, pensions and suppliers on December 13 - after those national parliaments that need to approve the package do so.
The German and Dutch lower houses of parliament and the Grand Committee of the Finnish parliament have to endorse the deal. Losing no time, Schaeuble said he had asked German lawmakers to vote on the package this week.
Greece will receive 43.7 billion euros in four installments once it fulfils all conditions. The 34.4 billion euro December payment will comprise 23.8 billion for banks and 10.6 billion in budget assistance.
The IMF's share, less than a third of the total, will be paid out only once a buy-back of Greek debt has occurred in the coming weeks, but IMF Managing Director Christine Lagarde said the Fund had no intention of pulling out of the program.
Austrian Chancellor Werner Faymann welcomed the deal but said Greece still had a long way to go to get its finances and economy into shape. Vice Chancellor Michael Spindelegger told reporters the important thing had been keeping the IMF on board.
"It had threatened to go in a direction that the IMF would exit Greek financing. This was averted and this is decisive for us Europeans," he said.
The debt buy-back was the part of the package on which the least detail was disclosed, to try to avoid giving hedge funds an opportunity to push up prices. Officials have previously talked of a 10 billion euro program to buy debt back from private investors at about 35 cents in the euro.
The ministers promised to hand back 11 billion euros in profits accruing to their national central banks from European Central Bank purchases of discounted Greek government bonds in the secondary market.
The deal substantially reduces the risk of a Greek exit from the single currency area, unless political turmoil were to bring down Samaras's pro-bailout coalition and pass power to radical leftists or rightists.
The biggest opposition party, the hard left SYRIZA, which now leads Samaras's center-right New Democracy in opinion polls, dismissed the deal and said it fell short of what was needed to make Greece's debt affordable.
Greece, where the euro zone's debt crisis erupted in late 2009, is proportionately the currency area's most heavily indebted country, despite a big cut this year in the value of privately-held debt. Its economy has shrunk by nearly 25 percent in five years.
Negotiations had been stalled over how Greece's debt, forecast to peak at 190-200 percent of GDP in the coming two years, could be cut to a more bearable 120 percent by 2020.
The agreed figure fell slightly short of that goal, and the IMF insisted that euro zone ministers should make a firm commitment to further steps to reduce the debt if Athens faithfully implements its budget and reform program.
The main question remains whether Greek debt can become affordable without euro zone governments having to write off some of the loans they have made to Athens.
Germany and its northern European allies have hitherto rejected any idea of forgiving official loans to Athens, but European Union officials believe that line may soften after next September's German general election.
Schaeuble told reporters that it was legally impossible for Germany and other countries to forgive debt while simultaneously giving new loan guarantees. That did not explicitly preclude debt relief at a later stage, once Greece completes its adjustment program and no longer needs new loans.
But senior conservative German lawmaker Gerda Hasselfeldt said there was no legal possibility for a debt "haircut" for Greece in the future either.
At Germany's insistence, earmarked revenue and aid payments will go into a strengthened "segregated account" to ensure that Greece services its debts.
A source familiar with IMF thinking said a loan write-off once Greece has fulfilled its program would be the simplest way to make its debt viable, but other methods such as forgoing interest payments, or lending at below market rates and extending maturities could all help.
German central bank governor Jens Weidmann has suggested that Greece could "earn" a reduction in debt it owes to euro zone governments in a few years if it diligently implements all the agreed reforms. The European Commission backs that view.
The ministers agreed to reduce interest on already extended bilateral loans in stages from the current 150 basis points above financing costs to 50 bps.
Additional reporting by Annika Breidhardt, Robin Emmott and John O'Donnell in Brussels, Andreas Rinke and Noah Barkin in Berlin, Michael Shields in Vienna; Writing by Paul Taylor; editing by David Stamp