A US student accused of spying in Iran has been freed after more than three years as part of a prisoner swap.
Chinese-American Xiyue Wang is on his way home after being released in exchange for Iranian Massoud Soleimani.
The trade, made in Zurich, Switzerland, marks a rare diplomatic breakthrough between Tehran and Washington after months of tensions.
Mr Xiyue is being taken to Landstuhl in Germany where he will be examined by doctors before returning to the US.
The Princeton University graduate student had been researching Persian history for his doctoral thesis in Iran in 2016 when he was arrested by the authorities.
He was accused by Tehran of “spying under the cover of research”, an allegation his family and the university deny.
He was subsequently convicted on espionage charges and sentenced to 10 years in prison in 2017.
More from Iran
Iran protests: ‘At least 106 dead’ in rallies over rising petrol prices
Protesters in Iran warned of ‘decisive’ action if unrest continues
Iran discovers new oil field that could boost reserves by a third, says President Rouhani
Iran to start injecting uranium gas into centrifuges
Hacks ‘carried out by Russian group disguised as Iranian cyber spies’
US launched secret cyber strike against Iran after attacks on Saudi oil facilities
Mr Soleimani, a stem cell expert, was arrested at Chicago airport in October 2018 for allegedly trying to export biological materials to Iran in violation of US sanctions on Iran over its nuclear programme.
He and his lawyers maintain his innocence.
In a statement issued by the White House, Donald Trump thanked the Swiss government for its help in negotiating Mr Xiyue’s release.
He added: “Freeing Americans held captive is of vital importance to my administration, and we will continue to work hard to bring home all our citizens wrongfully held captive overseas.”
Earlier, Iranian foreign minister Mohammad Javad Zarif had said the prisoner swap was imminent.
“Glad that Professor Massoud Soleimani and Mr Xiyue Wang will be joining their families shortly. Many thanks to all engaged, particularly the Swiss government,” he tweeted.
Switzerland represents US diplomatic interests in Iran, since Washington and Tehran cut diplomatic ties following the 1979 Iranian Revolution that led to the 444-day hostage crisis.
Mr Zarif later posted pictures of himself on Twitter with Mr Soleimani in front of an Iranian government jet and with the pair of them talking on board.
Responding to his release, Mr Xiyue’s wife, Hua Qu, said: “Our family is complete once again.
“Our son Shaofan and I have waited three long years for this day and it’s hard to express in words how excited we are to be reunited with Xiyue.
“We are thankful to everyone who helped make this happen.”
Tensions have been heightened between Iran and the US since Donald Trump last year pulled out of a 2015 nuclear deal with Iran and reimposed sanctions that have crippled the country’s economy.
In response, Iran has gradually scaled back its commitments to the agreement.
Washington has also demanded Iran release other Americans held, including father and son Siamak and Baquer Namazi; US Navy veteran Michael White, and Robert Levinson, a former FBI agent missing since 2007.
Several dozen Iranians are being held in US prisons, many of them for breaking sanctions.
US Secretary of State Mike Pompeo said: “The United States will not rest until we bring every American detained in Iran and around the world back home to their loved ones.”