Early Saturday, Cyprus secured a long-awaited bailout of up to 10 billion euros to bolster its troubled banking sector and public finances, but not without bank depositors taking a significant hit through a new tax.

Deposits of less than 100,000 euros will be levied at 6.75 % and higher deposits at 9.9 %.

The one-time “stability levy” would be applied immediately, with Cypriot authorities moving to freeze corresponding amounts in bank accounts, as the tax is expected to be made law by the time banks on the island reopen on Tuesday after a holiday.

The new tax — the first of its kind applied as part of a euro-zone bailout — is expected to generate 5.8 billion euros. It will apply to both Cypriot residents and non-residents. About one-third of deposits are in the hands of foreigners, especially Russians and British.

“It is not a pleasant outcome, especially of course for the people involved,” Finance Minister Michael Sarris said in Brussels after negotiating the bailout deal. “But we believe it is something that is — compared with other possible outcomes — the least onerous.” The tax is not meant to be “penalizing” the debt-ridden island, the leader of the euro-zone’s finance ministers, Jeroen Dijsselbloem, insisted on Saturday after the negotiations with Mr Sarris. He called the tax a “very fair way of sharing the burden.” European Central Bank board member Joerg Asmussen described the levy as “appropriate” and “tailor-made” for Cyprus. He said “there is no risk that this will happen” to depositors in other bailout countries.

The debt-riddled island is the fifth country in the euro-zone to receive a bailout, after Greece, Portugal, Ireland and Spain. It is the first to have a full rescue package from the euro-zone’s new bailout fund, the European Stability Mechanism.

Nicosia had haggled over the details for more than half a year with the European Commission, European Central Bank and International Monetary Fund (IMF).

The pressure was on to reach a deal on Friday during the special meeting of eurozone finance ministers, amid concerns that dragging out the issue much longer could reignite the currency bloc’s debt crisis. The talks lasted almost 10 hours.

“This has been a very difficult process, but the result achieved tonight reaches the essential goals of both maintaining financial stability (in the eurozone) and ensuring debt sustainability in Cyprus,” EU Economy Commissioner Olli Rehn said.

“The Euro-group has fulfilled its mission,” French Finance Minister Pierre Moscovici added on Twitter.

The bailout deal also foresees privatizations, a higher capital income tax, a downsizing of the banking sector, the sale of Cypriot bank branches in Greece, an increase in the corporate tax from 10 to 12.5 per cent and forced losses for junior bondholders.

Debt in the country, expected to hit 93.1 per cent of gross domestic product this year, should not exceed 100 per cent by 2020, the Euro-group said.

IMF chief Christine Lagarde described the plan as “sustainable,” fully financed and a fair sharing of the burden. She said she would recommend to her board to participate in the bailout, but did not specify its potential contribution.

The bailout deal also has to be endorsed by parliaments in several euro-zone countries, including Germany and Austria. The Euro-group said it hopes the rescue package to be finalized in April.

German Finance Minister Wolfgang Schaeuble had warned on Thursday that the road ahead for Cyprus is “very difficult.” German politicians had accused Cyprus of being a haven for money launderers and tax evaders, leading Nicosia to accept an international audit.

Cypriot President Nicos Anastasiades has pledged to abide by all conditions attached to the bailout. Sarris predicted that it “will help mark a new beginning for Cyprus.” The island will also ask Russia for an extension of an existing loan and possibly a second one as part of its international bailout, officials had said on Friday.

Mr Sarris is set to travel to Moscow on Wednesday. His Russian counterpart, Anton Siluanov, told the Interfax news agency that his country will ask Cypriot banks to provide information on Russian investments and companies in return for aid.