The Icelandic government was justified in refusing to compensate Britain for the state expense of bailing out depositors in Icesave, the court of the European Free Trade Association (EFTA) ruled yesterday.

In a surprise conclusion to a long-running and acrimonious saga, the court said pan-European depositor protection rules do not require nation states in the throes of a financial crisis to honour fully the overseas liabilities of their failed commercial banks.

The government in Reykjavik said yesterday that it took "considerable satisfaction" from the ruling by the EFTA. Ministers in the Nordic nation of just 320,000 people had been preparing for defeat.

Download the new Independent Premium app Sharing the full story, not just the headlines

Icesave's parent bank, Landsbanki, collapsed in 2008 at the height of the global financial crisis, threatening the savings of tens of thousands of UK residents who had opened high-interest-bearing online accounts. Iceland's bank deposit scheme at that time did not have sufficient funds to compensate all its overseas depositors.

The former Chancellor, Alistair Darling, in the interests of domestic financial stability, paid out £3.5bn to these savers to ensure that they did not lose a penny, and then demanded that the government in Reykjavik pick up the bill. The Dutch government, which also bailed out its citizens who had opened Icesave accounts, did the same.

At first, the Icelandic administration agreed to transfer the money – which was close to half of the nation's annual GDP – but then reversed itself after the decision was rejected by two referendums in Iceland in March 2010 and April 2011. The British government's use of anti-terrorist legislation to freeze Landsbanki's UK assets in 2008 after the bailout created widespread anger in Iceland.

The ruling by the EFTA, which has links with the European Union, does not mean the UK government will not be compensated for the expense. Iceland has so far used the liquidated assets of Landsbanki to pay out 90 per cent of what foreign governments are owed. This process will continue, the Icelandic foreign ministry said yesterday. But the ruling does establish the principle that national governments are not always responsible for the overseas liabilities of their banks that fail.

The court's judges said that the deposit protection directive "aims expressly to preclude an excessive shifting to the state of the costs arising from a major banking failure". Since the Landsbanki debacle, the rules governing cross-border banking in Europe have been modified. EU member states are today required to guarantee deposits of up to €100,000 (£85,000) for each saver.

The ruling was the cause of relief in Iceland. "Icesave is now no longer a stumbling block to Iceland's economic recovery," said the government. "This case has been particularly difficult to handle both nationally and internationally, and has occasioned, among other things, considerable delays in the implementation of the government's economic programme."

Iceland's Prime Minister, Johanna Sigurdardottir, called the verdict a "total victory for Iceland".