Cyprus secured a 10 billion euro ($13 billion) package of rescue loans in tense, last-ditch negotiations early Monday, saving the country from a banking system collapse and bankruptcy that could have destabilized the entire euro area. "We've put an end to the uncertainty that has affected Cyprus and the euro area over the past week," said Jeroen Dijsselbloem, who chairs the meetings of the 17-nation eurozone's finance ministers. In return for the bailout, Cyprus must drastically shrink its outsized banking sector, cut its budget, implement structural reforms and privatize state assets, he said. The country's second-largest bank will be shut down immediately, 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 and lead to more job losses. The cash-strapped Mediterranean island nation has been shut out of international markets for almost two years. After a botched agreement last week, the European Central Bank moved forcefully to focus leaders' minds, threatening to cut off crucial emergency assistance to the country's banks by Tuesday if no agreement was reached. Petros Giannakouris/AP Photo A long period of uncertainty and insecurity surrounding the Cyprus economy has ended. The eurozone finance ministers accepted the plan, reached after more than 10 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. Without a bailout deal by Monday night, the tiny nation of about 800,000 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 roiled markets and spurred turmoil across the entire eurozone of 300 million people, analysts said, even though Cyprus only makes up less than 0.2 percent of the eurozone's 10 trillion euro economy. After the eurozone's finance ministers' approval, several national parliaments in eurozone countries such as Germany must also approve the bailout deal, which might take another few weeks. Under the plan, Cyprus' second-largest bank, Laiki, will be restructured and holders of bank deposits of more than 100,000 euros there will have to take losses, Dijsselbloem said, adding that it was not yet clear how severe the losses would be. "This will have to be worked out in the coming weeks," he added, noting that it is expected to yield 4.2 billion euros overall. Savers' deposits with all Cypriot banks of up to 100,000 euros will be guaranteed by the state in accordance with the EU's deposit insurance guarantee, Dijsselbloem said. Laiki will be dissolved immediately into a bad bank containing its uninsured deposits and toxic assets, with the guaranteed deposits being transferred to the nation's biggest lender, Bank of Cyprus.