Iran on Saturday released a Princeton University graduate student who had been convicted and sentenced to 10 years in prison for supposed espionage. American officials had called the charges bogus.

Xiyue Wang, 38, who was arrested in 2016 as he did research work as a doctoral student for the New Jersey university, was freed in a swap for scientist Massoud Soleimani, who was awaiting a federal trial in Georgia. The exchanged happened in Switzerland.

Soleimani had come to the United States as a visiting scholar in stem cell research and regenerative medicine at the Mayor Clinic. U.S. authorities accused him and two of his former students of trying to smuggle expensive biological materials back to Iran.

Iran's foreign minister welcomed the swap, as did President Donald Trump.

"After more than three years of being held prisoner in Iran, Xiyue Wang is returning to the United States," the president said in a written statement released Saturday morning by The White House.

"A Princeton University graduate student, Mr. Wang had been held under the pretense of espionage since August 2016. We thank our Swiss partners for their assistance in negotiating Mr. Wang’s release with Iran. The highest priority of the United States is the safety and well-being of its citizens. 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."

U.S. special representative for Iran, Brian Hook stands with Xiyue Wang in Zurich, Switzerland on Saturday. (U.S. State Department via AP)

Other detainees from the United States remain behind bars in Tehran as the tense negotiations continue over Iran's unraveling nuclear deal.

U.S. Sen. Bob Menendez, D-N.J., who has been working to free U.S. hostages and political prisoners welcomed the news, saying that he had been charged "with completely fabricated and politicized accusations."

"Mr. Wang, an American citizen, was conducting scholarly research for his doctorate at Princeton. For more than three years Iranian authorities have let him languish and kept his family, including his wife and young son, in anguish over his well-being and eventual return," Menendez said.

“Tragically, Iran continues to pursue unjust, political detentions of its own citizens, Americans, and other foreigners. While we celebrate the release of Mr. Wang we cannot forget Robert Levinson, Michael White, and Baquer and Siamak Namazi and others unjustly detained.”

Enter your number to get the NJ 101.5 app

Sergio Bichao is deputy digital editor at New Jersey 101.5. Send him news tips: Call 609-359-5348 or email sergio.bichao@townsquaremedia.com.

Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.