Cyprus avoided bankruptcy, and potential turmoil across the Eurozone, by securing a last-minute 10 billion euro ($13 billion) bailout with promises to sharply cut back its oversized banking sector and make large bank account holders take losses to help pay much of the bill.
Negotiations into early Monday ended with approval of the deal by the 17-nation Eurozone's finance ministers. The European Central Bank (ECB) had threatened to cut off crucial emergency assistance to the country's banks by Tuesday if no agreement was reached.
Without a bailout deal by Monday night, the tiny Mediterranean nation would have faced the prospect of bankruptcy, which could have forced it to become the first country to abandon the euro currency. That would have sent the region's markets spinning.
"It's not that we won a battle, but we really have avoided a disastrous exit from the Eurozone," said Cyprus' Finance Minister Michalis Sarris.
The Eurozone finance ministers accepted the plan after hours of negotiations in Brussels between Cypriot officials and the so-called troika of creditors - the International Monetary Fund, the European Commission and the ECB.
"We believe that this will form a lasting, durable and fully financed solution," said IMF chief Christine Lagarde.
To secure the rescue loan package, the Cypriot government had to find ways to raise 5.8 billion euros ($7.5 billion) on its own. The bulk of that money is now being raised by forcing losses on large bank deposit holders, with the remainder coming from tax increases and privatizations.
"Cyprus must drastically shrink its banking sector, cut its budget, implement structural reforms and privatize state assets," said Jeroen Dijsselbloem, who chairs the meetings of the Eurozone's finance ministers.
The country's second-largest bank, Laiki, will be restructured, with all bond holders and people with more than 100,000 euros in their bank accounts there facing significant losses.
The measures are likely to deepen the recession in Cyprus.
The cash-strapped island nation has been shut out of international markets for almost two years. It first applied for a bailout to recapitalize its ailing lenders and keep the government afloat last June, but the political negotiations stalled. After a botched agreement last week, the ECB threatened to cut off emergency assistance to the country's banks.
"We've put an end to the uncertainty that has affected Cyprus and the euro area over the past week," Dijsselbloem said.
That uncertainty around the tiny nation of about 800,000 had shaken the entire Eurozone of 300 million people, even though Cyprus only makes up less than 0.2 per cent of the Eurozone's economy.
Several national parliaments in Eurozone countries such as Germany must also approve the bailout deal, which might take another few weeks. EU officials said they expect the whole program to be approved by mid-April.