Siamak Namazi and Morad Tahbaz, who were released during a prisoner swap deal between U.S. and Iran, arrive at Doha International Airport, Qatar Sept. 18, 2023. [Reuters]

The United States and Iran on Monday carried out a high-stakes prisoner swap that included freeing five Americans the U.S. government says were unjustly detained by the Tehran government.

Three of the Americans in the swap were identified as Siamak Namazi, Emad Shargi and Morad Tahbaz, who along with the other two Americans were under house arrest pending their release. The identity of the other two individuals remained private at their families' request.

U.S. President Joe Biden said in a statement the five individuals would "soon be reunited with their loved ones-after enduring years of agony, uncertainty, and suffering." He thanked the governments of Qatar, Oman, South Korea and Switzerland "for their tireless efforts to help us achieve this outcome."

Senior Biden administration officials told reporters the logistics of the swap involved a Qatari plane traveling from Iran to Doha carrying the five freed Americans, accompanied on the flight by Namazi's mother and Tahbaz's wife, who had been prevented from leaving Iran.

From Doha, the group was due to fly to Washington to be reunited with their families. The officials said all would have access to recovery and reintegration services offered by the U.S. Defense Department.

U.S. Secretary of State Antony Blinken said the Biden administration, in its 2 years in office, has now secured the release of more than 30 wrongfully detained Americans around the world and is working to free others.

The agreement included the United States allowing $6 billion in Iranian funds frozen under U.S. sanctions to be transferred from accounts in South Korea to accounts in Qatar.

The funds are designated for use only for Iranian humanitarian purposes, such as food, medicine and agricultural products.

The Biden administration officials told reporters the system is set up in a way that they are very confident the threat of the money being diverted for other purposes is very low, and if there is a diversion, the accounts will be locked up.

Former U.S. President Donald Trump and some U.S. conservative lawmakers criticized Biden for agreeing to the deal, contending the release of the $6 billion amounted to a "ransom" for the hostages and that the money would allow Iran to help develop its nuclear weapons system and not be used for humanitarian purposes.

Trump lashed out at Biden last week on Trump's Truth Social media site, saying the deal sets a "TERRIBLE precedent."

Senator John Thune said on Facebook that the "the U.S. should be unrelenting in its efforts to bring detained Americans home, but Iran will now count pallets of ransom money, putting its leaders in a better position to develop a nuclear weapon and fund terrorists. And the price to release U.S. hostages will only go up."

The White House, however, said the U.S. is not giving Iran any money.

"This isn't a payment of any kind. These aren't U.S. dollars. They aren't taxpayer dollars, they are Iranian dollars the [Trump] administration allowed them to make" in oil sales to other countries, National Security Council spokeswoman Adrienne Watson said in a statement.

The five Iranians who were part of the exchange were charged or convicted of nonviolent crimes in the United States and received U.S. clemency. They were identified as Kaveh Lotfolah Afrasiabi, Mehrdad Ansari, Amin Hasanzadeh, Reza Sarhangpour Kafrani and Kambiz Attar Kashani.

The Biden administration officials said the Iranians who lacked legal status in the United States would return to Iran through Doha.

Ansari and Kafrani have no legal U.S. status. Afrasiabi and Hasanzadeh are permanent U.S. residents, while Kashani is an Iranian-American dual national.

Ansari and Kashani were serving federal prison sentences, while Afrasiabi, Hasanzadeh and Kafrani were on supervised pre-trial release.

The officials said in addition to the prisoner swap, the United States is issuing new sanctions under the Levinson Act as it calls on Iran to give a full account of what happened to Robert Levinson, a former FBI agent who went missing in Iran under mysterious circumstances in 2007 and is presumed dead.

Biden said, "The Levinson family deserves answers. Today, we are sanctioning former President Mahmoud Ahmadinejad and the Iranian Ministry of Intelligence under the Levinson Act for their involvement in wrongful detentions. And we will continue to impose costs on Iran for their provocative actions in the region."

The U.S. leader also issued a new warning to Americans to not travel to Iran. He said Americans who go to Iran and are arbitrarily arrested and detained should "have no expectation that their release can be secured."