Baquer Namazi, an American citizen detained in Iran for more than six years, arrived in Oman on Wednesday and is bound for Abu Dhabi after international efforts to secure his release were intensified as a result of health issues.
From Oman he will be transferred to the UAE, where he will have an operation at the Cleveland Clinic in Abu Dhabi, the family said.
Upon his arrival in Muscat, Mr Namazi said it was no surprise that Oman played a vital role in his release.
"Baquer Namazi has arrived safely in Oman this afternoon," Oman's Foreign Minister Basr Al Busaidi tweeted.
"My thanks for the cooperation and good faith of all the parties involved. Much more remains to be done, but we will continue to assist in any way possible through encouraging dialogue and building confidence."
The former UN official, 85, was arrested in February 2016 while trying to visit his son, Siamak Namazi, who is also detained in Iran.
Mr Namazi was convicted in Iran of "collaboration with a hostile government" in 2016 and sentenced to 10 years in prison.
Iranian authorities released him on medical grounds in 2018 and closed his case in 2020, commuting his sentence to time served but effectively barring him from leaving the country. The US said the accusations of spying were baseless.
The announcement by Mr Namazi's lawyer that he had left Iran came shortly after Iranian state media broadcast footage of him climbing the stairs to board a plane on which the light blue insignia of the Royal Air Force of Oman could be seen.
"Today is a good day for the Namazi family, but the work is far from over. We now need the United States and Iran to act expeditiously to reach an agreement that will finally bring all of the American hostages home," said Jared Genser, who is acting as Mr Namazi's lawyer.
Mr Namazi's release comes as indirect talks between Iran and the US over how to revive the 2015 nuclear deal have stalled.
On arrival in Abu Dhabi, Mr Namazi will have a procedure known as a carotid endarterectomy at the Cleveland Clinic, the family said.
They said the operation would “clear out a severe blockage to his left internal carotid artery, which puts him at very high risk of a stroke”.
Mr Namazi's other son, Babak, was delighted at news of his father's release.
"It is impossible to articulate and describe sufficiently how I am feeling. I am just so grateful that after so long, I will shortly be able to embrace my father again,” he said.
He thanked Sultan Haitham of Oman for arranging his father’s transfer and the UAE for providing medical treatment.
He also thanked the governments of the US, the UK, Switzerland and Qatar for working “for years” to free Mr Namazi.
“While getting my father out of Iran is incredibly important, today is also bittersweet. My brother Siamak, as well as Americans Emad Sharghi and Morad Tahbaz, remain detained in Iran and our nightmare will not be over until our entire family, the other Americans, are reunited with their families,” he said.
Iranian authorities lured Mr Namazi, a long-term Unicef worker, to the country on the false promise that he would be able to meet his son.
Siamak Namazi, who had been detained in Iran for longer than any other US-Iranian, lived in Dubai before he was sentenced in October 2015.
He is “currently out of Evin Prison on a one-week renewable furlough”, according to the family.
Tehran’s leadership faces mounting pressure at home from anti-government protests.
There has been international outrage at the security forces' violent clampdown on protesters. Western criticism of Tehran's handling of the protests has complicated international mediation over the nuclear deal.
Iranian and US officials said recently that they had discussed prisoner exchanges through interlocutors but have always denied they are directly linked to talks over renewing the 2015 nuclear deal that the US abandoned in 2018.
Mr Namazi holds US and Iranian citizenship and is one of four Iranian-Americans held by Tehran. Iran does not recognise dual nationality.