Iceland's parliament has voted yes to a new plan to repay the UK and the Netherlands the 4bn euros (£3.1bn) they lost when the Icesave bank collapsed.
The money will be used to repay the UK and Dutch governments for reimbursing 400,000 citizens who lost savings when Icesave's parent, Landsbanki, collapsed late in 2008.
The terms of the agreement must now be approved by Iceland's president.
He said recently that this was much better than a previous deal.
He refused to approve the last parliament-backed repayment proposal.
But Iceland's Finance Minister Steingrimur Sigfusson told BBC Radio 5 that he thought the end of the matter was now in sight:
"In light of the strong majority that passed the bill today - more than two thirds of the members supported the bill - obviously that has importance in this context...it makes me more optimistic that now, finally, we will see the end of this very difficult case... hopefully it will be over and done with in a few weeks from now."
Under the terms of the latest deal Iceland will have longer to repay, and at a lower interest rate than before.
Iceland will pay the money back to the UK at a 3.3% interest rate between 2016 and 2046, rather than a 5.5% interest rate between 2016 and 2024.
The actual cost to the state is expected to be much less than the 4bn euros owed, as the government says most of the repayment will come from selling the assets of Landsbanki.
The government has said the cost could be a maximum 50 billion crowns (£265m).
Iceland's three main banks collapsed within days of each other in October 2008.
Iceland compensated its savers, but overseas savers faced losing all of their money.
The Netherlands and UK agreed to reimburse account holders in their countries and the Icelandic parliament agreed to the terms of a repayment deal in December 2009.
A referendum in Iceland overwhelmingly voted down the plan in March 2009, with the majority saying they, as citizens, should not be made to pay so much for their banks' bad decisions.
Late last year, the UK, Netherlands and Iceland agreed a new deal, pending approval by the Iceland parliament and president.
The issue of repayments created a diplomatic row between Iceland and the UK, as well as political controversy in Icesave's home country. It also created uncertainty over Iceland's economic recovery.