After months of quiet negotiations, Iran and the U.S. have reached an agreement that would see five American citizens considered to be unjustly detained released from custody and allowed to leave the country, ABC News has learned.
A lawyer representing one of the detainees tells ABC News that four of the five were released from Iran's notorious Evin prison on Thursday and are currently under house arrest in the country.
The move sets the stage for what a person familiar with the negotiations described as "a process" that -- if all goes well -- could ultimately see the four freed along with a fifth U.S. national who was already under house arrest and, according to the White House, had previously been held in prison.
The detained U.S. citizens include Siamak Namazi, Emad Shargi and Morad Tahbaz, as well as two others, a man and a woman, who asked that their identity not be made public.
A spokesperson for the White House's National Security Council confirmed the Americans' release in a statement. "While this is an encouraging step, these U.S. citizens ... should have never been detained in the first place. We will continue to monitor their condition as closely as possible. Of course, we will not rest until they are all back home in the United States," the spokesperson, Adrienne Watson, said.
"Negotiations for their eventual release remain ongoing and are delicate. We will, therefore, have little in the way of details to provide about the state of their house arrest or about our efforts to secure their freedom," Watson said.
A source familiar with those talks said the U.S. is not expecting the process to unfold quickly, anticipating that it might be weeks before Tehran approves the detainees' release from house arrest.
In a separate statement, State Department spokesperson Matthew Miller said, in part, "We continue to monitor these individuals' health and welfare closely. ... We continue to work diligently to bring these individuals home to their loved ones. They must be allowed to depart Iran and reunite with their loved ones as soon as possible."
If the Americans are ultimately allowed to leave Iran, the Biden administration is expected to then approve the release of roughly $6 billion worth of Iranian assets held in a restricted account in South Korea due to U.S. sanction laws.
A source familiar with working plans said the U.S. would mandate that the money go toward humanitarian causes, although it's not yet clear how the administration would enforce any restrictions.
The U.S. and Iran have not had formal diplomatic ties since 1980, and all official communication between the countries is conducted through indirect channels. These negotiations were brokered primarily by Oman and Qatar, with the United Arab Emirates, Iraq and Switzerland also providing assistance.
A completed deal would mark an uncommon agreement in the long-standing adversarial relationship between Iran the U.S. that has only grown more contentious in recent years.
It would also be the first time Tehran has approved a mass release of U.S. detainees since early 2016, when a prisoner swap coincided with the implementation of a landmark nuclear deal.
White House spokesperson John Kirby said later Thursday that the U.S. is still working out the details on when the Americans will be out of Iran but called their movement a "good first step" in the process to bring them home.
"We need to be careful about getting ahead of our skis on this one. Iran can be fairly unpredictable. This is a good first step, we think, [and] will ultimately lead to their freedom in a matter of weeks," Kirby said on MSNBC.
At a press event on Thursday, Secretary of State Antony Blinken confirmed his department had been in touch with the group.
"The State Department has been in contact with the five Americans, we spoke to them today. I think they're, needless to say, very happy to be out of prison. But we want to make sure that we complete this process and bring them home to their family," Blinken said.
He declined to share what he called "the details of this process," saying he didn't want to "jeopardize the release of our fellow citizens." He did however repeat some of the administration's talking points on the funds -- stressing that the U.S. would continue to hold Iran to account.
"In any event, in any respect, Iran will not be receiving any sanctions relief, and in any instance where we would engage in such efforts to bring Americans home from Iran, Iran's own funds would be used and transferred to restricted accounts such that the monies can only be used for humanitarian purposes," he said.
Iranian officials on Thursday said the release of the American detainees from prison was in exchange for money and, they claimed, for Iranian prisoners held in America -- which the U.S. has not confirmed.
"As part of a humanitarian cooperation agreement mediated by a third-party government, Iran and the US have agreed to reciprocally release and pardon five prisoners. The transfer of these prisoners to out of prison marks a significant initial step in the implementation of this agreement," Iran's Mission at the United Nations said.
Separately, Iran's deputy foreign minister blasted the sanctions against the country that led to the restricted funds in South Korea and said: "Tehran has received the guarantee of Washington's commitments. The release of several Iranians who were illegally detained in America is in this context."
At his briefing on Thursday, Blinken declined to say whether the U.S. would exchange Iranian prisoners for the detainees' release.
Namazi, Tahbaz, and Shargi were all accused of espionage by Iran -- charges that the U.S. calls baseless. The three have spent years behind bars in Iran's Evin prison, infamous for its human rights abuses and as a symbol of the regime's authoritarian power.
Namazi, 51, was detained in 2015 during a business trip to Iran. When his father, Baquer Namazi, journeyed to the country to attempt to see him, Baquer Namazi was jailed, too.
The elder Namazi was later released from prison but barred from exiting the country. In October, the government finally allowed the then-85-year-old to leave Iran so he could seek medical care. Officials also granted his son a brief furlough to visit with him.
After a little more than a week, the younger Namazi was forced to return to prison. He marked the seventh anniversary of his detention in early 2023 with a seven-day hunger strike intended to urge the Biden administration to do more to free Americans imprisoned in Iran.
In a statement shared by a family representative, Namazi's brother, Babak Namazi, said: "While this is a positive change, we will not rest until Siamak and others are back home; we continue to count the days until this can happen. We have suffered tremendously and indescribably for eight horrific years and wish only to be reunited again as a family."
Tahbaz, 67, an Iranian American conservationist who also holds British citizenship, was arrested in 2018 and soon after sentenced to 10 years in prison. He was granted a brief furlough in March, when Tehran approved the release of two other foreign nationals, but ultimately forced to return to Evin.
In a Thursday post on the social media platform X, formerly known as Twitter, Tahbaz's daughter Tara wrote, "We are encouraged by the development today on the conditions of our father and the other American hostages, but they are not free until they are home safely and reunited with their families."
Shargai, 58, was traveling in Iran with his wife in 2018 when he was detained without explanation. Iranian authorities initially confiscated his American passport, inhibiting him from leaving the country, before re-arresting him in 2020 and handing down a 10-year sentence for espionage.
Family members of all three prisoners said that the men have had to endure solitary confinement and inhumane treatment and that they feared for their loved ones' safety when a massive fire tore through Evin in October.
While the agreement would be a notable achievement for the Biden administration's efforts to bring wrongfully detained Americans home, it does not include any terms related to Iran's nuclear program, which the United Nations' atomic watchdog organization reports has been rapidly expanding in recent months.
In 2018, then-President Donald Trump exited a major nuclear agreement with Iran known as the Joint Comprehensive Plan of Action.
When Biden entered office, his administration promised to broker a "longer and stronger" version of the pact but has so far failed to strike any agreement limiting Iran's nuclear program.
Nuclear negotiations and talks aimed at securing the release of detainees have taken place on separate tracks, but their positive results have often aligned during periods when Washington and Tehran have displayed an increased willingness to cooperate.
However, there's currently no indication that the latest round of talks will yield any progress on the nuclear front.
ABC News' Justin Gomez and Will Gretsky contributed to this report.