Icesave collapsed last October
Iceland's parliament has approved plans to repay 3.8bn euros (£3.4bn) to savers in the UK and the Netherlands.
The money will go to the British and Dutch governments, who partially compensated savers when the Icesave online bank failed.
More than 320,000 savers lost out when the bank collapsed in 2008.
A bill on the measure, narrowly approved against strong opposition, was seen as crucial to Iceland's bid to join the EU and rebuild its economy.
The bill was passed by 33 votes to 30. The Icelandic government had threatened to resign if the measure was rejected.
"Approving the bill is the better option and will avoid even more economic damage," Finance Minister Steingrimur Sigfusson said during the debate.
"History will show that we are doing the right thing."
But the bill's opponents argue ordinary Icelanders should not have to pay and say the compensation amounts to some 12,000 euros for each citizen on the island nation of 320,000.
A poll taken in August suggests that 70% of Icelanders were against the Icesave deal.
An original agreement - negotiated with the British and Dutch governments - was approved in August.
But subsequent amendments negotiated by the prime minister were rejected in both countries, forcing a fresh vote.
Under the new deal the money - which represents 40% of the country's gross domestic product - will be repaid gradually, staggered until 2024.