In the end, the Cypriot government caved on every significant issue. They have to shutter their second largest bank, moving the toxic assets to a "bad bank" while taking up to a 40% cut off the top of uninsured deposits - deposits above 100,000 euros. Smaller depositors will have their accounts moved to the Popular Bank, the nation's largest. They will also be forced to raise taxes and reform the banking system, while lowering their budget deficit.
Laiki bondholders will be essentially wiped out.
The package came after several exhausting hours of negotiations with EU finance ministers.
The raid on uninsured Laiki depositors is expected to raise 4.2 billion euros, Eurogroup chairman Jeroen Dijssebloem said.
Laiki will effectively be shuttered, with thousands of job losses. Officials said senior bondholders in Laiki would be wiped out and those in Bank of Cyprus would have to make a contribution.
An EU spokesman said no across-the-board levy or tax would be imposed on deposits in Cypriot banks, although the hit on large account holders in the two biggest banks is likely to be far greater than initially planned. A first attempt at a deal last week collapsed when the Cypriot parliament rejected a proposed levy on all deposits.
Cyprus government spokesman Christos Stylianides said: "We averted a disorderly bankruptcy which would have led to an exit of Cyprus from the euro zone with unforeseeable consequences."
Asked about the level of losses on uninsured depositors in Bank of Cyprus, he told state radio: "The assessment is that it will be under or around 30 percent."
The Cyprus central bank said the agreement had also avoided the disorderly default of Laiki Bank.
Among Cypriots, there was a mood of wariness about the deal.
"How long will it last?" asked Georgia Xenophontos, 23, a hotel receptionist in Nicosia. "Why should anyone believe anything this government says?"
But many in the capital appeared intent on enjoying a sunny holiday morning, drinking coffee at pavement cafes and watching camera crews filming people drawing money from bank machines.
German Finance Minister Wolfgang Schaeuble said Cypriot lawmakers would not need to vote on the new scheme, since they had already enacted a law on procedures for bank resolution.
At a news conference in Berlin, Schaeuble said the agreement was "much better" from Germany's perspective than the deal last week that would have hit small depositors and was rejected by the Cypriot parliament.
The new deal offers the country the best chance of getting back on its feet, Schaeuble said.
The banks re-open tomorrow and it will be interesting to see how the ordinary Cypriot views the deal. Capital controls passed by the parliament last week will prevent the flight of money from the banks out of the country, but will ordinary Cypriots have enough faith in the government that they leave their cash in the bank rather than participating in a ruinous run on financial institutions?
The EU made sure that the Cyprus parliament would be unable to derail the deal. But there are legislative initiatives that have to go forward if Cyprus is going to get its deficit under control and reform its bloated banking system.
Update from David Paulin, on public opinion in Cyprus:
The answer to that was provided in a piece in the New York Times on Sunday:
According to a recent opinion poll by Cyprus's Sigma television, the public mood has turned decisively against Europe and toward Russia. More than two-thirds of those surveyed agreed that Cyprus should drop the euro and move closer to Russia because of the "behavior of our European partners." Protesters outside Parliament last week waved banners cursing the European Union and Chancellor Angela Merkel of Germany.
With Cyprus's banks closed for more than a week now, fear-driven rumors of secret deals and big power politics have become the main coin of the realm.
Oh, and here was Nigel Farage's take a few days ago. Can't wait until he deals with this in the EU Parliament: