Cyprus and its international creditors have agreed on the key elements of an agreement that paves the way for the nation to receive a 10 billion euro (£8.5 billion) bailout.

An EU diplomat said Cyprus' second-largest bank, Laiki, will be restructured and holders of bank deposits of more than 100,000 euro (£85,000) will have to take losses.

The diplomat, who spoke on condition of anonymity pending the official announcement, did not elaborate on how much large deposit holders would lose. Making them take a hit is expected to net several billion euro, thus reducing the amount of rescue loans the country needs. He said the agreement between Cyprus, the International Monetary Fund and the European Commission still needs approval by the 17-nation eurozone's finance ministers.

Without a deal, the Mediterranean island nation of about one million would face the prospect of bankruptcy, which could force it to abandon the euro currency and spur turmoil in the eurozone of 300 million people.

To secure a rescue loan package, Nicosia had to find ways to raise 5.8 billion euro (£4.9 billion) so it could qualify for the 10 billion euro bailout package. The bulk of that money is now being raised by forcing losses on large deposit holders as well as bondholders in Laiki bank, which will be split into a bad bank of toxic assets and a remaining viable core business. But Cyprus resisted pressure by creditors also to unwind the country's largest lender, Bank of Cyprus, the diplomat said.

In Cyprus, President Yiannakis Omirou confirmed that a preliminary agreement had been reached after about 10 hours of negotiations in Brussels. He could not provide details but stressed the agreement "doesn't involve the resolution of the Bank of Cyprus".

The European Central Bank had threatened to stop providing emergency funding to Cyprus' banks from Tuesday if there were no agreement on how to raise the 5.8 billion euro. A plan agreed to in marathon negotiations earlier this month called for a one-off levy on all bank depositors in Cypriot banks. But the proposal ignited fierce anger among Cypriots because it also targeted small savers, and failed to win a single vote in the Cypriot Parliament.

Under the new agreement, average savers' deposits with all Cypriot banks of up to 100,000 euro will be guaranteed by the state in accordance with the EU's deposit insurance guarantee, the diplomat said.

The international creditors, led by the IMF, were seeking a fundamental restructuring of the outsized financial system, which is worth up to eight times the country's gross domestic product of about 18 billion euro (£15.2 billion). They say the country's business model of attracting foreign investors, among them many Russians, with low taxes and lax financial regulation has backfired and must be reformed. They also insisted that Cyprus could not receive more loans because that would make its debt burden unsustainably high.

The eurozone finance ministers later accepted the plan, saving Cyprus from a banking system collapse and bankruptcy.