Iran on Saturday freed an American graduate student who had been imprisoned in Tehran for more than three years on suspicion of being a spy, in an exchange of prisoners at a moment of high tensions with Washington.
The American, Xiyue Wang, was flown in a Swiss government airplane from Tehran to Zurich, where he was met by Brian H. Hook, the State Department's special representative for Iran, according to two senior United States officials.
Mr. Wang, 38, was a fourth-year Princeton University graduate student conducting research in Iran when he was arrested there in August 2016. He was charged with espionage and sentenced to 10 years in prison. United States officials deny that Mr. Wang, who had been locked in Tehran's notorious Evin Prison, was a spy.
In exchange for Mr. Wang's release, the United States freed Masoud Soleimani, an Iranian scientist who was arrested at a Chicago airport last year and was convicted on charges of violating American trade sanctions against Iran. The Justice Department has dropped those charges. American officials said that Mr. Soleimani's release was a low price to pay for Mr. Wang's freedom because Mr. Soleimani was expected to be released from prison as early as next month under a plea agreement.
The White House confirmed the prisoner swap early on Saturday with a statement from President Trump. Iran's foreign minister, Mohammad Javad Zarif, also confirmed the deal on Twitter and posted photos of himself accompanying Mr. Soleimani home on an Iranian jet.
The senior American officials, speaking only on the condition of anonymity to discuss the delicate nature of the exchange, said they saw no indication that the exchange portended a larger dialogue with Iran.
But another senior administration official who briefed reporters on Saturday said he was "hopeful" the trade could signal a future willingness by Iran to discuss its broader relationship with Washington. Mr. Trump himself appeared to be thinking the same way. "Thank you to Iran on a very fair negotiation. See, we can make a deal together!" he tweeted on Saturday.
Mr. Trump has shown a particular interest in prisoner and hostage releases, highlighting them with triumphal White House welcomes. A senior administration official said on Saturday that he expected Mr. Trump would like to meet with Mr. Wang.
Speaking to reporters at the White House on Saturday, Mr. Trump, always keen to outdo his predecessor, noted that Mr. Wang "was taken during the Obama administration. We got him back during the Trump administration." He also referred to the exchange as a "one-on-one hostage swap." It was unclear whether he intended to suggest that the United States had been holding Mr. Soleimani on extralegal political grounds.
As part of a "maximum pressure campaign," Mr. Trump has targeted the country with severe economic sanctions. The president, who withdrew from the Obama-era Iran nuclear deal, has said he hopes to negotiate with Tehran over its nuclear program and regional aggression. On Wednesday, Iran's president, Hassan Rouhani, reiterated that Iran would be prepared to meet with the parties to the nuclear deal, including the United States, "whenever the U.S. lifts the unfair sanctions."
Trump administration officials believe Iran may have released Mr. Wang in order to soften its image and deflect attention from a recent brutal crackdown on mass domestic protests. American officials believe the unrest has left hundreds dead and as many as 7,000 imprisoned, drawing condemnation from around the world.
Mr. Hook, who flew to Zurich overnight on an American military jet to meet Mr. Wang on Saturday, briefed reporters on Thursday at the State Department on the crackdown, denouncing "the atrocities the Iranian regime has committed against its own people."
But it was Mr. Hook, working through Swiss intermediaries who often serve as a diplomatic channel between Washington and Tehran, who negotiated the prisoner exchange.
Mr. Hook has had no direct contact with Iranian officials since a March 2018 meeting in Vienna shortly before Mr. Trump withdrew from the nuclear agreement. In Vienna, Mr. Hook insisted to Iran's deputy foreign minister, Abbas Araghchi, that Mr. Wang's transparent activities made clear he was no covert operative. Mr. Araghchi countered that perhaps Mr. Wang had simply not been trained well, according to a senior United States official.
Mr. Wang, who has a wife and a young son, was a student of late-19th- and early-20th-century Eurasian history, according to a Princeton University website. Backed by university funding, he went to Iran in 2016 to study Farsi and conduct archival research for his doctoral dissertation.
Before his visit, Mr. Wang explained in writing his research plan to the Iranian interest section at the Pakistani Embassy in Washington, which issued his visa. "He was not involved in any political activities or social activism," the university says.
Iran's government charged that Mr. Wang had been "sent" to the country by Princeton and that he had ties to United States intelligence agencies.
In September 2018, a United Nations human rights panel found that Iran had "no legal basis" for Mr. Wang's "arbitrary" imprisonment and said he should be released immediately.
Mr. Wang was born in 1980 in Beijing and in 2001 came to the United States, where he was naturalized in 2009.
His wife, Hua Qu, celebrated his release in a statement on Saturday. "Our family is complete once again," she said. "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."
On Thursday afternoon, before she first heard rumors that her husband might be freed, she told a reporter in New York that her biggest wish was for him to be home in Princeton, N.J., for the holidays.
Mr. Wang flew from Zurich to an American military hospital in Germany where he is being evaluated before his return home. The official who briefed reporters said he appeared healthy and was in good spirits.
Mr. Soleimani, a prominent stem cell researcher who had been treating stroke patients at the Mayo Clinic in Minnesota, was charged with violating American trade sanctions by seeking to transfer growth hormones to Iran without a license. (He is not related to the senior Iranian military commander Qassem Soleimani.) His lawyers argued that the sanctions law at issue was ambiguous and that he had been swept up in rising tensions between the United States and Iran under Mr. Trump.
Mr. Soleimani, who had been held in an Atlanta prison, was due to appear in court next week, according to the official who briefed reporters. Asked whether the United States might be encouraging Iran to unjustly imprison more foreigners in order to trade them for duly convicted prisoners in America or for other concessions, the official noted that Iran had been granted no cash payments or sanctions relief. He added that he hoped Mr. Wang's release would be a sign that Iran's practice of "hostage-taking diplomacy" would come to an end, although it was unclear why that might be the case.
Another administration official said that when Secretary of State Mike Pompeo had discovered several weeks ago that Mr. Soleimani was likely to be released this winter under a plea agreement, he argued for the United States to "get something out of it."
Mr. Soleimani flew to Zurich on the same aircraft as Mr. Hook, under the supervision of federal marshals.
Iran has long spoken of a potential prisoner swap with the United States. In September, Mr. Zarif told NPR that he had offered to exchange Mr. Wang for Mr. Soleimani.
"The Chinese American in Iran is in jail on a charge on a court case. And I have offered to exchange them, because as foreign minister I cannot go to our court and simply tell them, 'release this man,'" he said. "I can go to the court and tell them, 'I can exchange this man for an Iranian,' and then have a standing, have a legal standing in the court."
American officials came to believe that Mr. Zarif expressed particular interest in Mr. Soleimani because he has a personal connection to the scientist, whose details remain unclear, one said.
At least four other Americans remain in custody in Iran, and Trump administration officials call their release a top priority. They include Siamak Namazi, a business consultant, and his father, Baquer Namazi, a former Unicef diplomat. Another, Robert Levinson, a former F.B.I. agent and C.I.A. contractor, disappeared in Iran more than 12 years ago. Iran unexpectedly disclosed last month it had an "ongoing case" into him.
American officials had been pressing Iran for more information about Mr. Levinson and for his return over the last two months. The Iranians were not forthcoming, a senior United States official said, but instead raised the idea of exchanging Mr. Wang for Mr. Soleimani.
In a statement, Mr. Levinson's sister-in-law, Suzi Halpin, welcomed Mr. Wang's release but called the news "bittersweet."
"We can't help but be extremely disappointed that, despite all its efforts, the United States government was unable to secure his release as well," Ms. Halpin wrote, referring to Mr. Levinson.
Babak Namazi, who is the son of Baquer Namazi and the brother of Siamak Namazi, expressed similar sentiments, saying he was thrilled for Mr. Wang and his family but "beyond devastated" that his father and brother had been left behind. "I hope, pray and expect that this is not a one-time trade but the beginning of an expedited process that will bring my family home soon," he said.