Europe's leaders are claiming a victory in the eurozone crisis after agreeing new deals that slash Greek debt and increase the firepower of the main bailout fund to around €1 trillion (£872bn).

Athens will be handed a new €100bn bailout early in the new year. The accord was reached in the early hours of Thursday after hours of debate.

At one stage talks broke down with holders of Greek debt but they ended up accepting a loss or "haircut" of 50% in converting their existing bonds into new loans.

Investors are likely to welcome the breakthrough. Sharp gains are predicted for European markets on opening, with the FTSE 100 being called up 75 points and similar rises expected on the German and French stock markets.

Angela Merkel, the German chancellor, helped broker the deal in talks with the bankers that also included the French president, Nicolas Sarkozy, and the head of the IMF, Christine Lagarde.

Merkel said the swap would take place in January. Sarkozy said private sector investors would refinance Greek's remaining debt at preferential rates while governments would find €30bn to go alongside €100bn from the private sectors.

He and Merkel insisted that the €440bn bailout fund, the European Financial Stability Facility (EFSF), could find its firepower increased by four to five times. Since the fund has about €250bn left this could amount to €1tn – or US$1.4tn in Sarkozy's words.

"We have reached an agreement which I believe lets us give a credible and ambitious and overall response to the Greek crisis," Sarkozy told reporters. "Because of the complexity of the issues at stake it took us a full night. But the results will be a source of huge relief worldwide."

Herman Van Rompuy, president of the European council, said the four-point package included a specific commitment that Greek debt would be reduced to 120% of GDP by 2020. It stands at more than 160% now and could peak at 186%, according to the recent report by the "troika" inspectors from the European commission, IMF and European Central Bank.

Van Rompuy confirmed the EFSF would be enabled to prevent any contagion spreading by insuring the first losses on Greek debt and on bonds issued by other eurozone countries in trouble. This would be combined with special purpose investment vehicles, also insured by the EFSF, attracting money from sovereign wealth funds and other sources. Sarkozy and senior EU officials will begin talks in Beijing this week to attract Chinese investment in the fund.

Van Rompuy reiterated that an earlier agreement on recapitalising Europe's weaker banks would set them a 9% capital ration, which they would have to achieve by the end of June 2012. Italy, he said, had given clear and precise commitments to reduce its own debt and revive its stagnant economy.

The European commission president, José Manuel Barroso, said: "These are exceptional measures for exceptional times ... Europe must never again find itself in this situation.

"Europe will do what it takes to safeguard financial stability. I've always said this is a marathon, not a sprint."

A 15-page communique issued in the early hours of Thursday morning called on the IMF to help finance the second Greek bailout programme, while Greece is expected to increase its privatisation proceeds by €15bn to help restore the lending capacity of the EFSF.