(Reuters) - The United States and Iran swapped prisoners - an American detained for three years on spying charges and an imprisoned Iranian - on Saturday in a rare act of cooperation between two longtime foes.

Following are reactions to the swap:

U.S. PRESIDENT DONALD TRUMP, IN STATEMENT RELEASED BY THE WHITE HOUSE

“After more than three years of being held prisoner in Iran, Xiyue Wang is returning to the United States. 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...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. SECRETARY OF STATE MIKE POMPEO, IN A STATEMENT

“Mr. Wang will soon be reunited with his wife and son, who have missed him dearly. The United States will not rest until we bring every American detained in Iran and around the world back home to their loved ones. We thank the Swiss government for facilitating the return of Mr. Wang, and are pleased that Tehran has been constructive in this matter. We continue to call for the release of all U.S. citizens unjustly detained in Iran.”

WANG’S WIFE, HUA QU, IN A STATEMENT

“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. We are thankful to everyone who helped make this happen.”

IRANIAN FOREIGN MINISTER MOHAMMAD JAVAD ZARIF, IN A TWEET

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

NIZAR ZAKKA, LEBANESE BUSINESSMAN RESIDENT IN THE UNITED STATES WHO WAS FREED IN JUNE AFTER FOUR YEARS IN PRISON IN IRAN, IN COMMENT TO REUTERS:

“Wang’s wife has got a visa to travel to Germany. Wang is expected to come to Washington DC on Monday.”

JASON REZAIAN, A WASHINGTON POST REPORTER HELD FOR 18 MONTHS BY IRAN ACCUSED OF ESPIONAGE AND RELEASED IN 2016, IN A TWEET

“I’m overjoyed this morning to wake up to the great news that Xiyue Wang is finally free.”

(This story corrects spelling of Rezaian in paragraph 14)