TEHRAN, Iran -- Iran and the U.S. conducted a prisoner exchange Saturday that saw a detained Princeton graduate student released for an Iranian scientist held by America, marking a potential breakthrough between Tehran and Washington after months of tensions.

Mohammad Javad Zarif made the first announcement on the trade viaTwitter. The trade involves graduate student Xiyue Wang and scientist Massoud Soleimani.

"Glad that Professor Massoud Soleimani 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.

President Donald Trump separately acknowledged Wang was free in a statement from the White House, saying he "is returning to the United States."

"Mr. Wang had been held under the pretense of espionage since August 2016," Trump said. "We thank our Swiss partners for their assistance in negotiating Mr. Wang's release with Iran."

The Swiss Embassy in Tehran looks out for America's interests in the country as the U.S. Embassy there has been closed since the 1979 student takeover and 444-day hostage crisis.

Brian Hook, the U.S. special representative for Iran, accompanied the Iranian scientist to Switzerland to make the exchange and will return with Wang, according to a U.S. official who spoke on condition of anonymity as the information had yet to be released.

Iran's state-run IRNA news agency later reported that Soleimani was with Iranian officials in Switzerland.

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. Wang was arrested while conducting research on the Qajar dynasty that once ruled Iran for his doctorate in late 19th and early 20th century Eurasian history, according to Princeton.

Hua Qu, the wife of Xiyue Wang, released a statement saying "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. "We are thankful to everyone who helped make this happen."

Iran has detained dual Iranian nationals and those with Western ties in the past to be used as bargaining chips in negotiations.

Soleimani -- who works in stem cell research, hematology and regenerative medicine - was arrested by U.S. 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 U.S. 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 U.S. since President Donald Trump unilaterally withdrew America from Tehran's nuclear deal with world powers in May 2018. In the time since, the U.S. has imposed harsh sanctions on Iran's economy. There also have been a series of attacks across the Mideast that the U.S. blames on Iran.