The U.S. and Iranian governments on Saturday announced a prisoner exchange that saw the release of four Americans held in Iran: Washington Post reporter Jason Rezaian, former U.S. Marine Amir Hekmati, pastor Saeed Abedini and Nosratollah Khosravi-Roodsari, whose name had not been previously made public.
Iran also agreed to continue searching for a fifth American, Robert Levinson, who disappeared in the country in 2007, U.S. officials said.
Another U.S. detainee, Matthew Trevithick, was also freed, but his case was said to be unrelated to the prisoner swap.
Here is what we know about their cases:
Jason Rezaian, 39
Rezaian, who was born and raised in the San Francisco Bay area and holds U.S.-Iranian citizenship, has been the Post's Tehran correspondent since 2012.
He was arrested in July 2014 along with three other journalists, including his wife, Yeganeh Salehi, who works for the Abu Dhabi-based National newspaper. The other three were later freed, but Rezaian remained in custody.
He was eventually charged with espionage and other offenses including "collaborating with hostile governments" and "propaganda against the establishment." His employers at the Post, his family and his lawyer called the accusations unfounded.
Evidence presented at Rezaian's closed-door trial reportedly included an online job application he submitted in 2008 to then-President-elect Obama's transition team and a U.S. visa application filed on behalf of his wife.
He had been held in Tehran's notorious Evin Prison, and his imprisonment had a serious impact on his health, family members have said.
Amir Hekmati, 32
Hekmati, a U.S. Marine veteran from Flint., Mich., was detained at the home of an Iranian relative in August 2011 and sentenced to death for espionage.
Iranian state television broadcast video of a purported confession by Hekmati in which he said he had been sent by the CIA to infiltrate the country's intelligence services. His family believes the statement was coerced.
"He was held in a 1-meter by 1-meter cell, allowed out for only 10 minutes a week to stretch his legs," his sister, Sarah Hekmati, told a congressional hearing in June. "He was beaten on his feet with cables, tasered repeatedly."
She said her brother was in Iran to visit an ailing grandmother and was assured before he went that his U.S. military service would not be an issue.
Hekmati, who was born and raised in the U.S., served as a Marine between 2001 and 2005, including a deployment to Iraq. He later worked as a contractor, providing linguistic and cultural education services to U.S. troops.
An Iranian appeals court overturned the verdict against him in March 2012 and ordered a new trial, which took place late the following year. He was then sentenced to 10 years in prison for "cooperating with hostile governments."
Saeed Abedini, 35
Abedini, a Christian pastor from Boise, Idaho, and father of two young children, was detained in September 2012 while on a visit to Iran, where he was born. He was accused of attempting to undermine national security by establishing churches in private homes.
His family and supporters say he was in the country to help establish an orphanage for street children. They believe he was targeted because he converted from Islam to Christianity and say he endured repeated beatings by guards and fellow inmates at Rajai Shahr prison outside Tehran.
"This has been an answer to prayer," Abedini's wife, Naghmeh, said in a statement released by the American Center for Law and Justice, a conservative Christian-based group. "This is a critical time for me and my family. We look forward to Saeed's return and want to thank the millions of people who have stood with us in prayer during this most difficult time."
Robert Levinson, 67
The retired FBI agent from Coral Springs, Fla., disappeared in 2007.
For years, U.S. officials maintained that he was on a private business trip. Family members said he was working as a private investigator for corporate clients and had been sent to Iran to investigate the smuggling of contraband tobacco.
It later emerged that he was on a CIA contract. But according to reports by several news outlets, he answered to analysts who did not have authority to run intelligence-gathering operations, and several agency officials were forced to resign over the affair.
Iran's government has never acknowledged holding Levinson, as it did with the other Americans.
His family received "proof of life" in the form of a video sent in November 2010 in which a haggard-looking Levinson begged the U.S. government to respond to the requests of unidentified captors. Six months later, photographs arrived of him wearing an orange jumpsuit and holding signs written in poor English, including one saying, "Why you can not help me."
"We are extremely worried about his health," Levinson's eldest son, Daniel, told the June congressional hearing. "He is 67 years old, with several pressing health concerns including diabetes, hypertension and gout."
The student from Hingham, Mass., went to Iran in September for a four-month language program at an institute associated with Tehran University, his family said in a statement to the Associated Press. It said he was held for 40 days in Evin Prison, but gave no reason for his detention.
"We are profoundly grateful to all those who worked for his release and are happy for all the families whose loved ones are also heading home," Trevithick's mother, Amelia Newcomb, and stepfather, Scott Armstrong, said the statement. "We look forward to reuniting with Matt and ask that all respect his privacy as he returns."
Times staff writer Patrick J. McDonnell in Beirut contributed to this report.