Euro zone, IMF secure deal on cutting Greek debt BRUSSELS (Reuters) - Euro zone finance ministers and the International Monetary Fund clinched agreement on reducing Greece's debt on Monday in a breakthrough to release urgently needed loans to keep the near-bankrupt economy afloat. After 12 hours of talks at their third meeting in as many weeks, Greece's international lenders agreed on a package of measures to reduce Greek debt by 40 billion euros, cutting it to 124 percent of gross domestic product by 2020. In a significant new pledge, ministers committed to taking further steps to lower Greece's debt to "significantly below 110 percent" in 2022 -- the most explicit recognition so far that some write-off of loans may be necessary from 2016, the point when Greece is forecast to reach a primary budget surplus. To reduce the debt pile, they agreed to cut the interest rate on official loans, extend their maturity by 15 years to 30 years, and grant Athens a 10-year interest repayment deferral. "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," German Finance Minister Wolfgang 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. Greece will receive up to 43.7 billion euros in stages as it fulfills the conditions. The December installment 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 only be paid out 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. They 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. They also agreed to finance Greece to buy back its own bonds from private investors at what officials said was a target cost of around 35 cents in the euro. They will certainly reduce the uncertainty and strengthen confidence in Europe and in Greece. Greek Prime Minister Antonis Samaras welcomed the deal. "Everything went well," he told reporters outside his mansion at about 3 a.m. in the morning. Tomorrow, a new day starts for all Greeks. However, the biggest opposition party, Syriza, dismissed the deal and said it fell short of what was needed to make the country's debt sustainable. The euro strengthened against the dollar after news of the deal and commodities and Asian shares also rose. Germany and its northern European allies have hitherto rejected any idea of forgiving official loans to Athens, but EU officials believe that line may soften after next year's German general election. Schaeuble told reporters earlier that debt forgiveness was legally impossible, not just for Germany but for other euro zone countries, if it was linked to a new guarantee of loans. 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 adjustment 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. The ministers agreed to reduce interest on already extended bilateral loans from the current 150 basis points above financing costs to 50 bps. No figures were announced for the debt buy-back in an effort to avoid triggering a rise in market prices in anticipation of a buyer. But before the meetings, officials had spoken of a 10 billion euro buy-back, that would achieve a net reduction of about 20 billion euros in the debt stock. An opinion poll published on Monday showed the Syriza party with a four-percent lead over the Conservatives who won election in June, adding to uncertainty over the future of reforms. Additional reporting by Robert-Jan Bartunek, Ethan Bilby, Luke Baker in Brussels, Reinhardt Becker in Berlin; Writing by Paul Taylor; Editing by Luke Baker and Anna Willard