BRUSSELS -- The countries that use the euro pulled Greece back from an imminent and potentially catastrophic default on Tuesday, when they finally stitched together a €130 billion ($170 billion) rescue they hope will also provide a lifeline to their common currency.
But the patchwork of measures - including the implementation of austerity measures in Greece and approval by skeptical German and Dutch Parliaments - required to give the rescue even a chance of success means it's unlikely to be the end of the continent's debt crisis.
European markets edged lower, having enjoyed solid gains in the run-up to the meeting on expectations a deal would be secured, while the euro rose 0.2 percent.
The finance ministers from Greece and the other 16 countries that use the euro wrangled until the early morning hours over the details of the rescue, squeezing last-minute concessions out of private holders of Greek debt.
The eurozone and the International Monetary Fund, which will be providing the money for the new bailout, hope the new program will eventually put Greece back into a position where it can survive without external support and secure its place in the euro currency union.
The accord, which had been months in the making, seeks to reduce Greece's massive debts on all fronts, with both private and official creditors going beyond what they had said was possible in the past.
On top of the new rescue loans, Athens will also ask banks and other investment funds to forgive it some €107 billion ($142 billion) in debt, while the European Central Bank and national central banks in the eurozone will forgo profits on their holdings.
The deal "closes the door to an uncontrolled default that would be chaos for Greece and Greek people," said European Commission President Jose Manuel Barroso.
But despite those unprecedented efforts, it was clear that Greece, which kicked off Europe's debt crisis two years ago, was at the very best starting on a long and painful road to recovery. At the worst, the new program would push the country even deeper into recession and see it default on its debts further down the line.
"It's not an easy (program), it's an ambitious one," said Christine Lagarde, the head of the IMF, adding that there were significant risks that Greece's economy could not grow as much as hoped.
Including Greece's first bailout worth €110 billion ($146 billion), the new deal means every Greek man, woman and child will owe the eurozone and the IMF about €22,000 ($29,000).
In Athens, the reaction to the news was a mixture of relief the country has avoided financial catastrophe and fear of a dark future.
"I don't see (the agreement) with any joy because again we're being burdened with loans, loans, loans, with no end in sight," architect Valia Rokou said in the Greek capital.
The eurozone and Greece had been under pressure to reach an accord quickly to prevent Athens from defaulting on a €14.5 billion ($19.2 billion) bond payment on March 20. The fear is that an uncontrolled bankruptcy could unleash market panic across the rest of the continent, further unsettling other struggling countries like Ireland, Portugal or the much bigger Italy or Spain.
Despite the promise of new rescue loans, the other 16 euro countries made clear that their trust in Greece is running low. Before Athens will see any new funds, it has to implement a range of promised cuts and reforms.
Greece will also have to pass within the next two months a new law that gives paying off the debt legal priority over funding government services. In the meantime, Athens has to set up an escrow account, managed separately from its main budget, that will at all times have to contain enough money to service its debts for the coming three months.
These requirements, together with tighter on-the-ground monitoring, are an unprecedented intrusion into the fiscal affairs of a sovereign state in Europe and could eventually see Greece being forced to pay interest on its debt before compensating teachers, doctors and other state employees.
Greek politicians nevertheless greeted the package as a turning point for their battered country.
"It's no exaggeration to say that today is a historic day for the Greek economy," said Greek Premier Lucas Papademos, who had rushed to the finance ministers' meeting to lend weight to his country's pleas for help.