A Chinese-American researcher convicted of spying in Iran has been 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 a Chicago airport last year. He was accused violating trade sanctions by trying to export biological material 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, announcing the exchange.
In a statement, US President Donald Trump said Mr Wang had been "held under the pretence 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."
Princeton University, where Mr Wang was studying as a postgraduate, said in a statement it was "overjoyed" with the news of his release and was looking forward to "welcoming him back to campus".