One of the Americans freed by Iran arrived home late Sunday, while several others were in Germany to receive medical treatment at a U.S. military hospital.
The Boston Globe published a picture of Matthew Trevithick and his mother at Boston's Logan Airport where he arrived late Sunday on a flight from Turkey. He was held for more than a month at Iran's Evin prison for reasons that are not yet clear.
U.S. Secretary of State John Kerry said Sunday that Trevithick and another American, Nosratollah Khosravi-Roodsari, had been "unjustly held in Iran."
Kerry announced Sunday that Washington Post journalist Jason Rezaian, former U.S. Marine Amir Mirzaei Hekmati and Christian pastor Saeed Abedini were safely in Germany. Rezaian was accompanied by his wife, journalist Yeganeh Salehi, and his mother.
"Today, all Americans celebrate the freedom of our fellow citizens," Kerry wrote on Twitter.
The release of the American prisoners was announced Saturday, just hours before Iranian and Western diplomats in Vienna announced implementation of a nuclear pact between Western powers and Iran.
Rezaian, an Iranian-American who served as the Post's Tehran bureau chief, was arrested in 2014 on espionage charges and spent over 500 days in jail, despite pleas and protests by the U.S. government, the Post, family and friends.
He was convicted on the espionage charges in a secret trial last year, but his sentence had never been disclosed.
Late Sunday, the Post published a memo sent to the newspaper's newsroom describing a telephone conversation between Rezaian, executive editor Martin Baron and foreign editor Douglas Jehl.
It said Rezaian was in good spirits, that he felt better then he did several months ago and that his mind is sharp.
Publisher Frederick Ryan released a statement saying the newspaper is "relieved that this 545-day nightmare for Jason and his family is finally over."
Other former detainees
The other three ex-detainees released as part of a prisoner swap are: Amir Mirzaei Hekmati, an Iranian-American and former U.S. Marine arrested in 2011 on spying charges while visiting his grandmother; Saeed Abedini, a Christian pastor imprisoned since 2012; and Nosratollah Khosravi-Roodsari, whose name had not been made public until Saturday.
Trevithick had been detained for 40 days while in Iran for an intensive language program to increase his fluency in Dari, a language closely related to Farsi.
Trevithick's release was separate from the those of the other four Americans.
WATCH: Related video on prisoner release, nuclear deal implementation
In return, U.S. President Barack Obama offered clemency to seven Iranians who have either been charged or convicted for violating U.S. trade sanctions against Iran.
Three of them, Bahram Mechanic, Tooraj Faridi and Khosrow Afghani, are accused of exporting electronics to Iran. Nader Modanlo was convicted in 2012 for helping Iran to place its first-ever satellite into orbit in 2005.
Two other men, Arash Ghahreman and Ali Saboonchi, were each convicted in separate cases, while Nima Golestaneh pleaded guilty last month in connection with the hacking of a Vermont-based software company in 2012.
The Obama administration also agreed to drop charges against 14 other Iranians outside the country. None of them are in U.S. custody, and officials have determined that efforts to have them extradited will not succeed.
Former US agent
As part of the prisoner release, Iran agreed to try to determine the fate of Robert Levinson, a former U.S. agent with the Federal Bureau of Investigation who disappeared there in 2007 while working on a project that has been linked to the CIA.
U.S. officials have said they are unsure he is still alive, but said that Iran has "committed to continue cooperating with the United States to determine the whereabouts of ... Levinson."
The lengthy and complex negotiations with Iran about its nuclear program climaxed in an agreement announced last July, but there was no mention of the prisoners issue at the time.
Obama and other senior U.S. officials have said they repeatedly demanded the release of Iran's American prisoners, but there had been, nevertheless, widespread criticism of the administration for failing to secure a firm agreement on the prisoners' release earlier.