Greece took a critical step Friday towards avoiding bankruptcy with a world-record debt write-off deal crucial for the country's second massive bailout from the IMF and the European Union. Athens announced that a large majority of the country's private creditors had agreed to a debt swap aimed at erasing 107 billion euros ($140 billion) worth of debt. The success of the deal meant Greece would be able to meet a looming March 20 debt payment deadline and that the eurozone had dodged a chaotic default that would have destabilised global financial markets. Though ratings firm Moody's declared Greece in default on its debt and a key derivatives group branded the deal a "credit event", eurozone finance ministers announced that their new bailout for Greece was on track, and that Athens has a second chance to rebuild its shattered economy. "The Eurogroup considers that the necessary conditions are in place to launch the relevant national procedures required for the final approval of the euro area's contribution to the financing of the second Greek adjustment programme," said Eurogroup head Jean-Claude Juncker. Echoing their support, the International Monetary Fund announced it intended to contribute 28 billion euros to the second rescue, an amount much larger than expected. "This is an important step that will dramatically reduce Greece's medium-term financing needs and contribute to debt sustainability," IMF managing director Christine Lagarde said of the private debt swap."The IMF's continued support would be part of an integrated package where all parties -- the Greek government, its European partners, the private sector, and the Fund -- would play their part to help the Greek people overcome this crisis and over time restore growth, contributing to broader global financial stability." Greek Prime Minister Lucas Papademos told the nation in a televised message the deal represented a "historic success". "A window of hope is opening up for Greece" amid its "worst post-war crisis", he said. Greece said after Thursday's deadline had passed that creditors had tendered support for the deal amounting to 83.5 percent of the debt Athens aimed to cut -- well above the 75 percent threshold needed. Their agreement was a key condition of the second bailout, along with approval by the Greek parliament of a raft of measures to help balance the budget and free up the country's economic potential. Athens said it would mop up remaining bonds affected by the exchange in the next two weeks. Finance Minister Evangelos Venizelos warned those investors who had not signed on that they would be "naive" to expect a better offer. On the basis of full acceptance, Greece would secure a write-off worth 107 billion euros, substantially reducing its total debt of roughly 350 billion euros. Officials hope this will keep Athens on track to cutting its debt to about 120 percent of gross domestic product (GDP) by 2020. German Finance Minister Wolfgang Schaeuble said they had already released 35.5 billion euros of the 130 billion second part of the bailout to cover eurozone participation in the bond swap. The remaining 94.5 billion euros, essentially loans to Athens, would probably be released next week, he added. "We are not out of the woods but we have taken an important big step," Schaeuble said. Markets gave mixed reactions to the deal. Fitch Ratings cut Greece to a "restricted default" rating, while Moody's declared Greece in default on its debt. "According to Moody's definitions, this exchange represents a 'distressed exchange,' and therefore a debt default," the US-based rating firm said. "The risk of a default, even after the debt exchange has been completed, remains high," it added. And the International Swaps and Derivatives Association declared a credit event over the deal, triggering payment of $3.2 billion worth of insurance policies known as credit default swaps to investors in Greek bonds. But European and US shares closed moderately higher a day after sharp rallies in anticipation of the deal. The euro eased to $1.3120 in late New York trade. Berenberg Bank chief economist Holger Schmieding commented that "of course, the Greek issue won't go away. "Whether or not Greece can bear its debt burden is more a question of its future growth potential than of its precise debt burden," he said. And the leader of the private sector debt talks with Greece, Institute of International Finance head Charles Dallara, warned against any more eurozone sovereign debt restructuring in the wake of Greece's huge writeoff deal. "I would strongly discourage other governments, other peoples of Europe from going this route," Dallara told CNBC television.