Five Americans freed from Iranian detention on Monday are on their way back to the United States after initially stopping in Doha, Qatar, according to a US official and a source familiar with the matter. The five, all of whom had been designated as wrongfully detained, were freed as part of a wider deal that includes the US unfreezing $6 billion in Iranian funds. The release of the Americans brings to an end a yearslong nightmare for those who had been detained. Three of those who are part of the deal – Emad Shargi, Morad Tahbaz and Siamak Namazi – had all been imprisoned for more than five years. Namazi had been detained since 2015. The identities of the other two Americans are not publicly known. Siamak Namazi’s mother, Effie Namazi, and Morad Tahbaz’s wife, Vida Tahbaz – who were previously unable to leave Iran – were also on the flight from Iran to Doha, a senior Biden administration official said. They were flown out of Tehran on a Qatari government jet to Doha on Monday afternoon local time, before taking off for the Washington, DC, area to be reunited with their families, the senior administration official said. In a statement Monday, President Joe Biden celebrated the release of the five Americans “after enduring years of agony, uncertainty, and suffering.” “Today, five innocent Americans who were imprisoned in Iran are finally coming home,” Biden wrote in the statement released shortly before the Americans were scheduled to land in Doha. Their release represents a significant diplomatic breakthrough after years of complicated indirect negotiations between the US and Iran, who do not have formal diplomatic ties. A senior Biden administration official said the deal “has not changed our relationship with Iran in any way,” noting the US would still work to hold Iran accountable for its human rights abuses and to constrain its nuclear program. In his statement, Biden thanked “partners at home and abroad for their tireless efforts to help us achieve this outcome, including the Governments of Qatar, Oman, Switzerland, and South Korea.” Monday’s release – the latest high-profile deal negotiated by the Biden administration to secure the release of Americans deemed wrongly detained abroad following the release of Americans from Russia and Venezuela – was met with criticism from some Republicans, who likened it to a “ransom payment.” ‘Call your family members and let them know that you’re OK’ The overall contours of the deal began to crystallize in Doha about seven months ago after years of indirect negotiations. The first tangible public steps under the deal took place about five weeks ago, when four of the Americans were transferred into house arrest. The fifth American was already under house arrest. In the weeks following the move to house arrest, the Swiss ambassador to Iran made regular visits to the Americans to check on their conditions, the senior administration official said. Switzerland serves as the US protecting power in Iran since the US does not have a diplomatic presence there. And in the days leading up to the release, the US government had carefully sketched out the logistics of how things would go, with the caveat that things could always change, officials familiar with the matter said. Once the plane arrived in Doha, a senior State Department official said there would be medical personnel on the ground to meet the freed Americans. They would also be on the plane back to the US. And “we’re going to be handing them government phones and and telling them: ‘Go ahead and call your family members and let them know that you’re OK, and that you’re coming back,’” the official said. Secretary of State Antony Blinken said he spoke with the seven Americans freed from Iran when they landed in Doha in what he called “an emotional conversation.” “Today, their freedom, the freedom of these Americans for so long unjustly imprisoned and detained in Iran means some pretty basic things: it means that husbands and wives, fathers and children, grandparents can hug each other again, can see each other again, can be with each other again,” Blinken said. The family of Emad Sharghi said in a statement that they were able to speak with him in a “very short” conservation, but “he sounded excited and optimistic.” They also spoke with Biden by phone, who told them “that he started the effort to free these Americans when he first took office and wishes that it could have been brought to this happy conclusion earlier but he’s very happy it got there today,” according to the statement. A US official said Biden spoke with all of the families. The family of Morad and Vida Tahbaz said they were “are overjoyed and relieved” to have their loved ones finally free. “We are grateful to President Biden and his Administration for making the difficult but necessary decision to prioritize the lives of American citizens over politics. Thank you for leading with courage and compassion,” the family said in a statement to CNN. And Siamak Namazi, who had been detained since 2015, said in a statement, “For almost eight years I have been dreaming of this day.” “Now that it is finally here, I find my ineffable joy of my forthcoming reunification with my family is laced with sorrow – a painful and deep feeling of guilt for taking my breaths in freedom while so many courageous individuals that I love and admire continue languishing behind those walls,” he said. Once the freed Americans return to the US, they will have the option to participate in a Department of Defense Program known as PISA (Post Isolation Support Activities) to help them acclimate back to normal life, officials said. $6 billion transfer of funds Under the agreement between the US and Iran, $6 billion in Iranian funds that had been held in restricted accounts in South Korea was transferred to restricted accounts in banks in Qatar. Iranian and US officials were notified by Qatar on Monday that the transfer had taken place, according to a source briefed on details of the matter. Sources told CNN the funds came from oil sales that were allowed and placed into accounts set up under the Trump administration. Biden administration officials have stressed that the funds that have been transferred to the accounts in Qatar can be used by Iran only for humanitarian purchases and that each transaction will be monitored by the US Treasury Department. “We are implementing this arrangement through the establishment of what we are calling the humanitarian channel in Qatar,” which is designed to protect against money laundering and misuse of the funds, the first senior administration official said. The agreement also involves the release of five Iranians in US custody. The first senior administration official noted that two of the five Iranians had served a majority of their sentences; the other three were awaiting trial and had not yet been convicted. According to the Iranian Foreign Ministry, two of the Iranians were returning to Iran, one was expected to leave for another country, and the other two were expected to remain in the US. Those who are remaining in the US do not pose a national security risk, US officials said. “The Iranians that are being released as part of this are small potatoes,” a senior State Department official said. “There are some big, big fish that the Iranians want out of our judicial system that they’ve asked for for some time. We’ve been engaged in difficult and principled negotiations for a long time and out of that process, they’re not getting anybody that they really care about.” ‘A really good deal’ The first senior State Department official said the Biden administration feels it has “a really good deal.” “We feel like we’re going to get these Americans out on terms that are good both for them as well as for the American people, so we’re moving forward with this,” the official explained, adding that they believe the US “got the better end of the stick in this deal.” Senior administration officials would not discuss when Biden signed off on the deal. Brett McGurk, White House coordinator for the Middle East and North Africa, said Monday that the Biden administration had been engaged in negotiations to get the five Americans released “since the earliest weeks of our administration.” “We had standards of what we would accept, and what we would not accept, and really over the last six months, that process intensified. We had very intense negotiations in Doha in Qatar – we’re very grateful to Qatar, and also to Oman, for helping to facilitate this – and when the arrangement came together on terms that we could accept, based on the standards that we always said we would accept, the president made the difficult, but the right decision to move ahead,” he told CNN’s Jake Tapper on “The Lead.” Former Vice President Mike Pence – under whose tenure the White House made two prisoner swap deals with Tehran – criticized Biden in a speech Monday afternoon for allowing Iran to “foment terrorism across the Middle East.” The senior administration official pushed back on the criticism, saying, “These are some of the most difficult decisions a president makes, but I think this deal stands up.” “When you look at the full contours of the deal, compared with the alternative – the alternative is these Americans never come home. So I think it very much holds up,” they said. US issuing new sanctions on Tehran over Bob Levinson Following the release of the five Americans, the US issued new sanctions against Iran targeting Tehran’s Ministry of Intelligence and former Iranian President Mahmoud Ahmadinejad, senior administration officials said, seeking to punish them for a lack of answers around Bob Levinson, an American detained in Iran for more than a decade who is believed to have died there. “We’ll never give up on Bob Levinson’s case,” one senior administration official said. “We can’t emphasize strongly enough that the Iranian regime must finally come clean, allow for Bob Levinson to be at peace, and for the Levinson family to have answers. We will continue to call on Iran to give a full accounting of what happened to Bob Levinson, from his initial captivity to his ultimate murder,” a second senior administration official said. The Levinson family said in a statement that they welcomed the news of the release of the Americans and the new sanctions, “but make no mistake: Today’s good news does not end our family’s nightmare and ongoing pain. Nor does it mask or excuse the shameful cruelty and unending lies of the Iranian regime.” “We will never stop demanding that Iranian leaders answer for what happened to Robert Levinson, the greatest man we have ever known,” they said. “The actions announced today with the full force of the U.S. government behind them are a welcome step toward justice for Bob Levinson, and they are by no means the last. We will not rest until the cruel Iranian regime is held fully accountable, and our father knows true peace,” they said. This story has been updated with additional developments.