A Chinese-American researcher convicted of spying in Iran is to be freed in an apparent exchange for the release of an Iranian scientist held by the US.
Xiyue Wang was arrested in Iran in 2016 for "collaborating with foreign governments".Massoud Soleimani, a stem cell expert, was arrested at Chicago airport last year.
He was accused of attempting to export biological materials to Iran.
Both deny the charges.
"Glad that Professor Massoud Soleimani and Mr Xiyue Wang will be joining their families shortly," Iranian Foreign Minister Mohammad Javad Zarif tweeted.
In a statement, US President Donald Trump said Mr Wang had been "held under the pretense of espionage".
"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," the statement said.Mr Zarif tweeted photos of himself with Mr Soleimani after his release.
Hua Qu, Mr Wang's wife, confirmed her husband had been released.
"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," she said in a statement.
"We are thankful to everyone who helped make this happen."