People with Cyprus bank accounts will lose up to 10% of their savings as the price of a €10bn rescue package for the cash-strapped country from its European partners and the International Monetary Fund.

The bailout was agreed early today in a bid to keep the island nation from a bankruptcy that could rekindle the region's debt crisis.

But in a major departure from established policies, the package also includes a one-off levy on the money held in bank accounts in Cyprus.

Analysts have warned that making depositors take a hit threatens to undermine investors' confidence in other weaker eurozone economies and might possibly lead to bank runs.

In return for the rescue loans Cyprus will trim its deficit, shrink its troubled banking sector, raise taxes and privatise state assets, said the Netherlands' Jeroen Dijsselbloem, presiding over meetings of the 17-nation eurozone's finance ministers.

"The assistance is warranted to safeguard financial stability in Cyprus and the eurozone as a whole," he said, speaking after nearly 10 hours of negotiations.

People with less than €100,000 in their Cypriot bank accounts will have to pay a one-time tax of 6.75%, those with more will lose 9.9%.

The measure is expected to net €5.8bn in additional revenues, Mr Dijsselbloem said, greatly reducing the country's financing need.

"We found it justified in terms of burden sharing to also involve the depositors," said Mr Dijsselbloem, noting that it was a "unique measure" because of Cyprus' outsized banking system.

"As it is a contribution to the financial stability of Cyprus, it seems just to ask a contribution of all deposit holders."

But the measure risks to scare investors in Europe's weaker economies, which could lead them to move their deposits to more stable eurozone countries like Germany.

In that case, banks in southern Europe's economies might be considerably weakened and possibly require new bailouts.

That could then weaken the respective governments, which might then need further assistance from their eurozone partners, possibly setting off a vicious spiral.

Joerg Asmussen, a member of the European Central Bank's governing council, sought to dismiss fears of bank troubles stemming from the levy, saying the central bank stood ready to provide financial institutions with emergency liquidity assistance.

"The levy, it's an appropriate tool. It's really tailor-made to the situation in Cyprus," he said. "It's a country in extreme financing need and what you do is to expand the tax base, not only to residents but also to non-residents."

Russian citizens are estimated to have at least €20bn in deposits in Cyprus.

Mr Asmussen stressed that there was no risk of such a levy being implemented in other countries that have already received bailouts, such as Greece, Ireland or Portugal because those countries' financing needs are covered ,by their international rescue loans.

In a sign of how exceptional and urgent a decision the one-time levy is, Cypriot banks are already implementing measures to make sure that depositors cannot withdraw money to shrink the tax basis, Mr Asmussen said.

The remainder of their holdings can be freely withdrawn.

Cypriot MPs are expected to decide a law on the bank levy over the weekend and the money will be extracted early next week.

Russia was also expected to significantly extend the maturity of a €2.5bn loan granted in 2011, the officials said.

While the bailout for the east Mediterranean island is many times smaller than those of Greece or Ireland, it was still considered crucial to the eurozone's future because a default even by a small country could rock financial markets and undermine investor confidence in other eurozone nations.

To reduce the amount of bailout loans Cyprus needs to keep its government afloat and recapitalise its banks, the ministers agreed to raise its corporate tax by a quarter, up from 10 to 25%, Mr Dijsselbloem said, and make sizeable Greek operations of the country's two largest banks, Bank of Cyprus and Laiki, eligible for spare rescue cash from Greece's bailout accord.

The economy of Cyprus, an island of almost a million people, represents less than 0.2% of the eurozone's annual economic output.

But even the most reluctant EU partners such as Germany have accepted it would be better to bail Cyprus out than to let it go bankrupt, which could rekindle the bloc's three-year-old debt crisis.

Cyprus, which first applied for a bailout last summer, was not in imminent danger of bankruptcy, as it faces its next bond redemption in June.

But the European Central Bank, concerned that prolonged uncertainty over Cyprus could hurt market sentiment across the eurozone, has pushed for a swift deal, even threatening to cut off the country's financial system from emergency funding.

The finance ministers' agreement still has to be approved by parliaments in several eurozone nations, though EU officials say everything should be done by the end of the month.

To appease its potential rescue creditors, Cyprus has already accepted an independent audit of its banks, which hold billions in Russian deposits, to soothe concerns voiced by Germany, France and others that they launder dirty Russian money.