Five Americans jailed for years in Iran and widely regarded as hostages are on their way home to the United States.
The last pieces in a controversial swap mediated by Qatar fell into place when $6bn (£4.8bn) of Iranian funds held in South Korea reached banks in Doha.
It triggered the next step – to allow the four American men and one woman in Tehran, who are also Iranian citizens, to board a flight to Qatar’s capital.
They will be met by senior US officials and then flown to Washington.
The Americans are reported to include 51-year-old businessman Siamak Namazi, who has spent nearly eight years in Tehran’s notorious Evin prison, as well as businessman Emad Shargi, 59, and environmentalist Morad Tahbaz, 67, who also holds British nationality.
The US has said its citizens were imprisoned on baseless charges for use as political leverage.
In the first indication a deal was reached, they were moved in mid-August from Evin to a safe house in Tehran.
Five Iranians imprisoned in US jails, mainly on charges of violating US sanctions, are also being granted clemency as part of this swap. Not all of them are expected to return to Iran.
They have been named by Iran as Reza Sarhangpour, Kambiz Attar Kashani, Kaveh Lotfolah Afrasiabi, Mehrdad Moein Ansari and Amin Hasanzadeh.
The deal comes after months of indirect talks mediated by Qatar, which began in February last year.
A source briefed on the negotiations say there were at least nine rounds of difficult discussions in Doha, with the American and Iranian delegations staying in separate hotels.
Senior Qatari officials also shuttled between Tehran and Washington.
Iranian officials have repeatedly declared they will spend their money as they wish. But sources involved in this process insist these funds will be strictly controlled.