Nazanin Zaghari-Ratcliffe - a British-Iranian woman who's been held for nearly six years in Iran - has been released and is on her way back to the UK.
Her release - and that of another dual national, Anoosheh Ashoori - was linked to the payment by the UK of a multi-million pound debt to Iran, over a failed arms deal dating back 40 years.
In the 1970s the Shah of Iran - the pro-Western monarch who then ruled the country - ordered 1,500 Chieftain tanks and 250 Armoured Recovery Vehicles from the UK in a deal worth an estimated £650m.
The money was paid to International Military Services (IMS), a private company, then a subsidiary of the Ministry of Defence.
Only 185 of the tanks were delivered to the Iranian authorities before the Shah was deposed in the Islamic Revolution of 1979.
The Iranian government has been trying to regain the money for the undelivered tanks ever since.
In 1990, Iran took IMS to the International Chamber of Commerce (ICC), a global business organisation which rules on trade disputes between countries.
In 2001, a hearing found in favour of Iran. IMS appealed, although in 2002 it agreed to pay £328.5m to the court, in case its appeal was unsuccessful.
The appeal hearings concluded in 2009 and the decision was upheld in favour of Iran.
However, the European Union had placed sanctions on Iran in June 2008, and IMS's payment was not released to the Iranians.
The UK government admitted it owed Iran for the undelivered tanks, but said it could not make the payment while Iran was still subject to economic sanctions.
In addition, there was the complicating factor of how much the UK owed Iran.
The £328.5m security payment made by IMS in 2002, has attracted a considerable amount of interest since then. The UK disputed how much of this should be paid to Iran.
The British-Iranian was detained in April 2016, and has spent nearly six years in detention for allegedly plotting against the Iranian government. She protested her innocence throughout this time.
Ms Zaghari-Ratcliffe said she had been told by her captors that her imprisonment was connected to the fact that the UK had not paid its debt.
The former foreign secretary, Jeremy Hunt, said in 2021 that Iran was linking her case and the unpaid debt.
He said "I think they [Iran] are trying to use this as leverage to settle the historic debt for the Chieftain tanks and that's what they want settled. We obviously reject any linkage because we don't want to encourage hostage diplomacy and we want to follow the legal processes."
Ms Zaghari-Ratcliffe and Mr Ashoori have now been released after months of talks between UK Foreign Secretary Liz Truss, and her Iranian counterpart.
Another dual national, Morad Tahbaz, has also been released from jail in Iran on furlough as part of the deal.
Ms Truss has announced that the the UK settled the IMS debt "in parallel" to the prisoner release.
She told MPs that "highly complex" negotiations led to the government finding a way to make a payment of £393.8m, and that the payment complied with existing sanctions, global counterterrorism financing rules and anti-money laundering regulations.
Ms Truss said the terms would remain confidential, but added that Iran could only use the funds for humanitarian purposes.