BRUSSELS (AP) - After more than 12 hours of talks, the countries that use the euro reached an agreement early Tuesday to hand Greece euro130 billion ($170 billion) in extra bailout loans to save it from a potentially disastrous default next month, an European Union diplomat said. The euro surged as the news broke, climbing 0.7 percent to $1.328 within minutes. While much depended on the details of the deal, a final agreement on the bailout for Greece will take some pressure off the 17-country currency union, which has been battling a serious debt crisis for two years. The deal - details of which were still being worked out by European finance ministers in an all-night session in Brussels - was expected to bring Greece's debt down to 120.5 percent of gross domestic product by 2020, according to the official. The country needs the euro130 billion ($170 billion) bailout so it can move ahead with a related euro100 billion ($130 billion) debt relief deal with private investors. Last week, a new report from Greece's debt inspectors indicated that the country's debt would still be close to 129 percent of GDP by the end of the decade, despite massive new spending cuts planned by Athens and a tentative euro100 billion debt relief deal with private investors. That level would have prevented the IMF and some euro countries from putting up more rescue money - on top of a euro110 billion bailout Greece received in 2010. Moving in and out of talks with bondholder representatives and consultations with the IMF and the European Central Bank, the ministers pushed private investors to accept steeper losses, going beyond a 50 percent cut in the face value of their bonds. It was unclear what the final deal with bondholder representatives looked like, but the lower debt level suggested that they agreed to further losses. Greek state television claimed early Tuesday that the private investors will see a 53 per cent cut on the face value of their bonds, bringing overall losses to around 75 per cent on the value of the bonds. The big question will now be how many banks and other investment funds will actually agree to participated voluntarily and whether Greece will have to force some holdouts to sign up to make the deal effective. The lower debt level also suggested that the ECB agreed to forego some profits on its Greek bondholdings to help close the funding gap in the new bailout package. Analysts estimate that the central bank owns between euro50 billion and euro55 billion in Greek bonds, which it bought at a discount.