Eurozone finance ministers and the International Monetary Fund struck a deal early Saturday to bail out Cyprus with aid of up to 10 billion euros, diplomats said after some 10 hours of talks.

The debt rescue will involve "up to 10 billion euros," said one diplomatic source, whereas the initial request from Nicosia last year was for some 17 billion euros.

The official said that the IMF would participate to the tune of one billion euros ($1.3 billion) in loans under the agreement.

Under the deal, deposits in Cypriot banks would be hit with a one-off "levy" of up to 9.9 percent, depending on the amounts held.

At the same time, a "withholding tax" will be imposed on interest on bank deposits, in a further hit for private investors in the Cypriot banking system.

Monday is a bank holiday in Cyprus so it will be Tuesday before depositors will be able to react.

The talks dragged on as the Cypriot government fought to avoid such a "bail-in" or haircut for the banks, which Nicosia argued would trigger a run on its banks and ricochet on through the wider eurozone financial system.

Cyprus -- which accounts for just 0.2 percent of the combined eurozone economy -- thus becomes the fifth member state to secure a debt rescue package from its eurozone partners in the three-year debt crisis.

The price tag is very small compared with two rescues for Greece worth some 380 billion euros ($496 billion), Ireland's 85 billion euros, Portugal's 78 billion and 41 billion for Spanish banks.

Cyprus President Nikos Anastasiades attended the talks, as well as European Central Bank head Mario Draghi.

IMF managing director Christine Lagarde had stressed beforehand the need for a watertight solution.

"We don't want a bandaid (solution). We want something that lasts, that is durable and sustainable," Lagarde said on her arrival.

"We have underlined with Wolfgang Schaeuble that we want to see an aid programme drawn up before the end of March, we are within that schedule," added French Finance Minister Pierre Moscovici, referring to his German counterpart.

Eurogroup head and Dutch Finance Minister Jeroen Dijsselbloem said the package was designed "to make sure that there is stability in the eurozone and that there is a new sustainable growth path possible for Cyprus.

Cyprus, whose banks were badly exposed to their failed peers in Greece, sought a bailout in June 2012 but negotiations proved difficult, with the country hoping to get help from Russia with whom it has strong ties.

Cyprus Finance Minister Michalis Sarris will reportedly fly to Moscow for talks Monday about extending a 2.5-billion-euro Russian loan payment due in 2016.

Russians are among the biggest investors in Cyprus, and hardline lenders like Germany had pressed for months for a clampdown on banks' alleged involvement in money laundering.

The total annual output of the Cypriot economy is 17 billion euros, and the IMF was concerned that a bailout on that level would take the country's debt burden to unsustainable levels.