by Gavin Hewitt
Amongst European officials and ministers there is a huge sigh of relief.
The country that has been at the heart of the eurozone's debt crisis has, for the moment, been taken off the critical list. Some of the pressure on the eurozone has lifted.
The second bailout for Greece will avert imminent bankruptcy and Greece will stay in the eurozone.
The deal comes in two parts. Investors have been asked to take steep losses so reducing the Greek debt mountain by 107bn euros (£89bn; $142bn).
The losses will be deeper than expected - up to nearly 55%. We will not know until March how many investors have accepted this deal but Greece is expected to pass a law enforcing losses on those reluctant to agree to the terms.
The second part of the deal opens the way for Greece to receive 130bn euros in loans.
Before any money is released Greece has to implement 3bn euros in spending cuts. The EU has said that delivery of the funds depends on Greece honouring its promises in a "timely and effective manner".
Eurozone governments have also agreed to lower the interest rates on the loans they made for the first bailout. That should reduce Greece's debts by a further 2.8%.
The European Central Bank has agreed to forego profits on its holdings of Greek debt, another saving for Greece.
All of this comes at a price.Saved or pushed?
Permanent monitors from the EU, the IMF and the ECB will be placed on the ground in Athens to ensure there is no back-sliding.
It is a humiliating and unprecedented intrusion into Greece's sovereignty.
Athens will also have to set up a separate account that ensures priority is given to servicing debts and interest payments above funding government services.
These measures reflect the level of mistrust towards Greece.
From today Greece is being told how to run its budget and how to spend its funds. That is the price for avoiding a return to the drachma.
The biggest challenge to this plan is the Greek economy. It is in free fall. It shrunk by 7% in the last quarter of 2011. Unemployment is up to 21% and rising.
Yet Greece is now being asked to implement new cuts and swiftly. The minimum wage is to be slashed by 22%. Some pensions will be cut. Between now and 2015, 150,000 public sector workers will be fired.
To the question when will growth return to this battered economy, there is a shaking of heads.
Perhaps in a decade, I am told. The risk is that the new cuts will only deepen an existing recession.
Even the head of the IMF agrees that there are dangers Greece's economy will not grow as fast as some are predicting.
Greece now heads for an election in April. Parties that are not committed to the terms of this bailout may do well. Further protests could test the will of politicians to enforce more austerity.
So the question remains: is Greece's future secure or has this deal just bought time for the eurozone to build greater protection around its banks and around potentially vulnerable countries like Spain and Italy?
As for Greece, has it been saved or pushed further into a cycle of decline?
EU officials describe this as a historic deal that underlines the strength of solidarity within the EU.
Other voices predict that in a few months Greece will once again be teetering on the edge of default.