Tehran: An American held in Iran on allegations of espionage since 2016 has been released and is on his way back home, President Donald Trump announced Saturday.

"After more than three years of being held prisoner in Iran, Xiyue Wang is returning to the United States," Trump said in a statement.

Trump's comments came soon after Tehran's foreign minister Mohammad Javad Zarif announced an apparent prisoner swap involving Wang and Masoud Soleimani, an Iranian scientist in US custody.

Earlier report

Iran’s foreign minister said on Saturday a detained Princeton graduate student will be exchanged for an Iranian scientist held by the US, marking a potential breakthrough between Tehran and Washington after months of tensions.

Mohammad Javad Zarif made the announcement on Twitter. The trade involves graduate student Xiyue Wang and scientist Massoud Sulaimani.

“Glad that Professor Massoud Sulaimani and Mr. Xiyue Wang will be joining their families shortly,” Zarif wrote. “Many thanks to all engaged, particularly the Swiss government.”

In his tweet, Zarif confirmed rumours that had been circulating for days that a deal was in the works to free Wang.

There was no immediate acknowledgment of the trade by the US. Lawyers involved in the cases could not be immediately reached. The State Department did not immediately respond to a request for comment.

Wang was sentenced to 10 years in prison in Iran for allegedly “infiltrating” the country and sending confidential material abroad. His family and Princeton University strongly denied the claims. Iran has detained dual Iranian nationals and those with Western ties in the past to be used as bargaining chips in negotiations.

Sulaimani - who works in stem cell research, hematology and regenerative medicine - was arrested by US authorities on charges he had violated trade sanctions by trying to have biological material brought to Iran. He and his lawyers maintain his innocence, saying he seized on a former student’s plans to travel from the US to Iran in September 2016 as a chance to get recombinant proteins used in his research for a fraction of the price he’d pay at home.

Tensions have been high between Iran and the US since President Donald Trump unilaterally withdrew America from Tehran’s nuclear deal with world powers in May 2018. In the time since, the US has imposed harsh sanctions on Iran’s economy. There also have been a series of attacks across the Mideast that the US blames on Iran.