Media playback is unsupported on your device Media caption Cyprus' banks have been badly exposed to Greece, which has itself received huge bailouts

Eurozone finance ministers have agreed a 10bn-euro (£8.7bn) bailout package for Cyprus to save the country from bankruptcy.

The deal was reached after talks in Brussels between the ministers and the International Monetary Fund (IMF).

In return, Cyprus is being asked to trim its deficit, shrink its banking sector and increase taxes.

For the first time in a eurozone bailout, bank depositors are facing a levy on their savings.

Cyprus' banks were badly exposed to Greece, which has itself been the recipient of two huge bailouts.

There could be serious repercussions for other financially over-stretched economies, such as Spain's and Italy's, from the nature of Cyprus's bailout

"The Eurogroup was able to reach a political agreement with the Cypriot authorities on the cornerstones of this agreement," Eurogroup head Jeroen Dijsselbloem said after almost 10 hours of the negotiations.

"The assistance is warranted to safeguard financial stability in Cyprus and the eurozone as a whole,'' he added.

IMF chief Christine Lagarde, who took part in the talks, said earlier: "We don't want a Band-Aid. We want something that lasts, that is durable and sustainable."

Russian deposits

The deal also involves a levy on bank deposits intended to ensure investors contribute to the bailout, the BBC's Andrew Walker in Brussels reports.

People with less than 100,000 euros in Cypriot bank accounts will have to pay a one-time tax of 6.75%, while those with more will have to pay 9.9%. It is expected to raise 5.8bn euros in additional revenue.

Analysis It has been a long and difficult negotiation, partly because of the reluctance of other Eurozone countries to use taxpayers' money to help foreign customers of Cypriot banks. Many of them are wealthy Russians. There are concerns around Europe about whether all that money was legitimately acquired and also about how effective Cyprus is in dealing with money laundering. The deal involves a levy on bank deposits intended to ensure those investors contribute to the bailout. But it will apply to all deposits - at a higher rate on amounts above 100,000 euros. A European Central Bank official said he anticipated the levy could be imposed before the banks open on Tuesday - Monday is a bank holiday in Cyprus. There would otherwise be a likelihood of massive withdrawals to avoid it. The Eurozone financial authorities have been keen until now to preserve bank deposits. The big question is whether this new precedent might unnerve bank customers in other countries in difficulty. The danger if that were to happen is that some might want to pull their money out which could undermine the banks further.

A European Central Bank (ECB) official said the Cypriot authorities had already started to take action to ensure that the levy can be collected. Otherwise, there would be a likelihood of massive withdrawals to avoid it, our correspondent adds.

There has also been speculation that Russia could help finance the bailout by extending a 2.5bn-euro loan already made to Cyprus. Cypriot Finance Minister Michael Sarris will travel to Moscow for meetings on Monday, reports say.

There are a lot of Russian deposits in the Cypriot banking system, according to economists.

Jacob Funk Kirkegaard, of the US-based Peterson Institute for International Economics, said that was a potential problem for any bailout negotiations.

"There is a general political sentiment that it is not acceptable to be bailing out a country, and thereby putting European taxpayers' money at risk, to basically protect Russian depositors in Cypriot banks," he said.

The Cypriot economy accounts for barely 0.2% of the eurozone's overall output. But there is concern within the euro bloc that a default by Cyprus risks undermining the progress being made in Greece.

Cyprus is the fifth country to receive eurozone assistance since the bloc's financial crisis began to unfold in earnest nearly three years ago.