IT WAS an appalling way to reach a decision, but in the end the euro zone’s €10 billion ($13 billion) bail-out package for Cyprus, agreed in the early hours of March 25th, was something approaching a reasonable compromise. At any rate, it dealt with the most egregious errors of the previous all-night deal. It keeps Cyprus in the euro zone. And it restores the promise to protect bank deposits covered by the EU-mandated €100,000 deposit guarantee.

Cyprus is the fourth euro-zone country to receive a full bail-out after Greece, Ireland and Portugal (or the fifth, if one counts the partial bail-out for Spain’s banks). But unlike previous rescues, the package for Cyprus left a large part of the island’s financing needing to be found from its outsized banking sector—in particular from depositors, many of them Russian businessmen.

On March 16thCyprus’s president, Nicos Anastasiades, desperate to protect Cyprus’s status as an offshore banking model for Russians, had decided to save the two biggest banks and thus to spread the pain thinly. He would have applied a hefty tax to all depositors: 9.9% for those too big to be covered by the EU-mandated €100,000 deposit guarantee, and 6.75% for the smaller depositors.

But after a week of brinkmanship—including protests by Cypriots, the extended closure of banks to avoid the outrush of money, a failed attempt by Cyprus to throw itself at Russia’s feet, an ultimatum by the European Central Bank and an eleventh-hour threat by Cyprus to leave the euro zone—a different decision was made: to apply the pain much more intensely, but on a smaller number of large depositors.

The country’s second-biggest bank, Laiki, would be wound down. Viable assets and insured deposits would be put into a “good bank”. Another €4.2 billion worth of uninsured deposits would be placed into a “bad bank”, to be disposed of, with no certainty that big depositors will get any money back.

The treatment of the biggest bank, Bank of Cyprus, was a bit less harsh. It is to be restructured severely by wiping out shareholders and bailing in bondholders, both junior and senior. Uninsured depositors would probably incur haircuts of the order of 35%, said senior sources involved in the negotiation. The “good bank” emerging from Laiki would be merged with Bank of Cyprus.

Jeroen Dijsselbloem (rubbing his eyes in the picture above), who chairs the euro zone’s group of finance ministers, said the deal was better than the previous one in several respects. To begin with, it concentrated on the cause of Cyprus’s woe—the crippling of its two largest banks, which were heavily exposed to Greece. Moreover it would restore the protection of guaranteed deposits. And it would establish a sensible hierarchy of creditors when banks have to be wound up or restructured. Under the previous agreement, senior bondholders (who, admittedly, account for a relatively small sum) would have been spared while even small depositors would have been hit.

After the upheavals of the past week, and months of earlier negotiations, the euro zone has ended up with a deal that is similar to the solution first proposed by the IMF, which was backed by Germany but rejected by Cyprus (and to some extent by the European Commission). The IMF had suggested winding down both Laiki and Bank of Cyprus and splitting them into good and bad banks. Now Mr Anastasiades has salvaged the shell of the Bank of Cyprus, but at the cost of encumbering it with bad assets. The scale of the bail-in that will be required to bring it to the target capital-ratio of 9% remains unclear.

It took a popular protest, and a threat by the European Central Bank to cut off liquidity to Cyprus by March 25th if a deal were not reached, to change Mr Anastasiades’s mind about trying to protect those big foreign depositors at the expense of small domestic savers.

When he travelled to Cyprus to try to agree a new package on March 24th, the Cypriot president tried to push the issue out of the hands of finance ministers in the "euro group" and onto the lap of the leaders who would be called for a special summit. At one point, participants said, Mr Anastasiades threatened to resign, even to pull Cyprus out of the euro zone.

In the end, he relented. The European leaders, fed up with Cyprus’s tactics, had refused to yield. Their confidence was increased by the fact that depositors did not start bank runs in other troubled parts of the euro zone, and the market's initial nervousness soon abated. Germany and other creditor states are growing weary of successive bail-outs. Even France, usually the champion of “solidarity”, could not summon the will to bail out Cyprus’s “casino” banking, as Pierre Moscovici, the French finance minister, put it.

So as well as exacting their bail-in, they declined to offer any more money, even though the Cypriot economy has been further weakened by the upheavals of recent days. The creditors were helped by the IMF’s view that too big a loan would simply make Cyprus’s debt unsustainable.

The immediate question is whether Mr Anastasiades can get his recalcitrant parliament, which had rejected the previous package by a vote of 36-0, to support the effective dismantling of Cyprus’s offshore banking system.

A further question is when Cypriot banks will able to reopen, and when “temporary” restrictions on the movement of capital—the first time any have been imposed during the euro-zone crisis—will be lifted. Big deposits in Bank of Cyprus will be frozen until their fate is settled.

Then another point of uncertainty is to do with Russia's reaction. The euro zone hopes that it, too, will contribute to their effort by rescheduling its €2.5 billion loan to Cyprus. But now that its own citizens are being stung for billions of euros' worth of deposits, the Kremlin may not be so sympathetic.

Nobody doubts that, after such a severe blow to its lucrative banking sector, Cyprus will be pushed into a harsh recession. Some sources in the troika tentatively estimate that GDP will shrink by about 10% before any hope of recovery.

Perhaps the biggest question is this: once the banks have been cleaned up and shrunk, where will Cyprus find economic growth? The promise of offshore gas deposits is still too uncertain, and tourism may well decline if Russians suddenly find the island to be less hospitable to their money.

Whether the euro zone has gained any credibility for this round of clear-eyed decision-making is a different matter altogether.

(Picture credit: AFP)