REYKJAVIK, Iceland – Iceland decided Friday to repay Britain and the Netherlands the $5.7 billion it borrowed to compensate savers in those countries’ who lost funds in the collapse of an Icelandic Internet bank last year.

The Icelandic government overcame heavy opposition to the compensation plan, securing backing from a majority of lawmakers by pledging to link the pace of debt repayment to the rate of growth in the crisis-hit island nation.

Iceland will begin repaying 2.3 billion pounds ($3.8 billion) to Britain and euro1.3 billion ($1.9 billion) to the Netherlands from 2016, with payments spread over the following nine years.

Prime Minister Johanna Sigurdardottir said the deal allowed Iceland to honor its international obligations, while still ensuring debt sustainability and the restoration of the crippled financial system.

Iceland must settle the claims arising from the collapse of the Icesave online bank before it can draw on $4.6 billion in promised bailout funds from the International Monetary Fund and Nordic countries.

The deal approved Friday could also help ease Iceland’s membership talks for entry into the European Union, which formally opened last month.

“The Icelandic parliament has a solemn duty to ensure an economically sustainable future for the country,” said Icelandic Prime Minister Johanna Sigurdardottir. “Its conclusion of the matter aims towards securing the recovery of Iceland’s financial system and economy.”

Britain, which along with the Netherlands agreed in June to lend Iceland the funds to reimburse Icesave customers, said it welcomed Iceland’s commitment “to meeting its obligations,” but added it would look carefully at the conditions placed on the loan “to ensure that they are reasonable.”

There had been strong opposition to the “Icesave bill” in Iceland, with protesters repeatedly demonstrating outside Reykjavik’s parliament as lawmakers spent 10 weeks debating the bill.

Critics argued that it would force the tiny North Atlantic nation to make repayments it could not afford.

Iceland was an early victim of the credit crunch, which sent its debt-fueled economy into a tailspin. Landsbanki collapsed in October, as did Glitnir and Kaupthing, the country’s two other leading banks. The value of the country’s currency has plummeted, while unemployment and inflation have risen.