The crisis in Cyprus has reached fever pitch. Now that the Cypriot parliament has resoundingly refused to endorse the proposal to tax bank deposits, all outcomes are possible. This includes the direst scenarios, from the collapse of banks to a government default to a disorderly Cypriot exit from the eurozone.

Yet, fortunately, markets have regained their footing and appear remarkably calm for the moment. Many are perhaps reasoning that a way must and will be found to fill the financing gap in Cyprus’s program with the so-called troika of the International Monetary Fund (IMF), the European Central Bank, and the European Commission. Observers may also believe that the €5.8 billion that would have been raised by the tax represents a trivial amount compared to the disruption and possible contagion that would accompany a meltdown. Or markets may be simply relieved that the Cypriot parliament has finally brought a little sanity back to the table.

That takes me to my main point: it is clear now, if it was not before, that the troika’s decision to endorse a program that taxes—or rather raids—the insured deposits of ordinary Cypriots was legally dubious, morally unjustifiable, managerially inept, and economically foolish.

Legally dubious, because “insured” should be easily understood.

Morally unjustifiable, because all depositors are not the same. Why penalize depositors in sound banks as well as unsound ones; widows and orphans as well as speculators; and British and Russian pensioners as well as oligarchs?

Managerially inept, because there are better alternatives. A partial list includes Cyprus borrowing against the collateral of its gas reserves, securitizing uninsured deposits (those above €100,000) and extending their maturity, and even restructuring the government debt, as was done in Greece. Moreover, eurozone diplomats could surely have done a better job of involving the Russians, who own about 30 percent of the deposits in the Cypriot banking system, in a joint approach to the crisis, instead of demonizing and marginalizing them.

Economically foolish, because the agreement by the concert of nations (including the 200-odd members of the IMF) to tax insured depositors establishes a dangerous precedent. It could greatly complicate Cyprus’s recovery, intensify the credit crunch in the periphery of Europe, and reduce the room for maneuver in future crises. It would be surprising if there were not a general exodus of money out of banks in Cyprus, forcing capital controls to be imposed in a eurozone country for the first time.

Those who fear for Italy’s stability as new elections loom, or Spain’s as unemployment continues to rise, will probably now be even more inclined to take their money out. And when another panic attack occurs somewhere in the periphery—as it almost certainly will—the memory of Cyprus will make it doubly difficult for the authorities to restore confidence.

Members of the Eurogroup, the eurozone’s finance ministers, have insisted that Cyprus does not set a precedent and that this is a special circumstance given the size of its banking system and its reliance on Russian depositors.

Perhaps, perhaps not. But who would give the Eurogroup the benefit of the doubt after this? And, in fact, if they were prepared to raid insured deposits to avoid lending €5.8 billion, will they hesitate if the sums at stake are 100 times greater—as would be the case if there were a relapse in Spain or Italy?

However the crisis is ultimately resolved, there are at least two other lessons to be drawn from this sad episode. First, the IMF remains happily married to its “mainly fiscal” philosophy, despite its protests that it has become more pragmatic and more sensitive to the equity dimension of its programs.

Second, even though Europe has agreed on a common supervisory mechanism for its banks, it remains a galaxy away from the kind of solidarity that would allow a common deposit insurance scheme or a common resolution mechanism to function properly.

To avoid such disasters in the future, the Eurogroup should consider including civil society representatives from the country it is trying to rescue. This would help to remind the finance ministers that there is a lot more at stake than euros and cents.

And the parliament in Nicosia should do Cyprus and the rest of Europe a big favor and maintain its rejection of penalties on insured depositors.