(CNN) -- In July 2009, American friends Shane Bauer, Josh Fattal and Sarah Shourd set out on an adventurous vacation. They had been pals for a long time. Bauer and Shourd, boyfriend and girlfriend and in their late 20s, had been living for about a year in the Syrian capital of Damascus, where he was working as a freelance journalist and she studied Arabic and taught English.
Josh Fattal, also in his late 20s, was an environmentalist who'd come to visit Bauer and Shourd.
According to Shourd, the three University of California-Berkeley graduates planned their hiking route in the Kurdistan region of northern Iraq, an autonomous area a good distance away from battles raging in another part of Iraq at the time.
But the friends were not long into their trip when Iranian authorities detained them July 31 and accused them of illegally crossing the Iraq border into Iran. Bauer, Shourd and Fattal were sent to Iran's Evin prison in Tehran, which is notorious for allegations of torture.
Iranian media called them spies.
Shourd would be released 14 months after their arrest. And on Wednesday September 21, 2011, Fattal and Bauer were released from prison.
Their ordeal was described in news reports throughout the years. Shourd once said that after their arrest, the three feared being executed. A guard had repeatedly shoved Bauer, and another cocked his gun.
In November 2009, U.S. Secretary of State Hillary Clinton met with the hikers' families. She said Iran should release them on "humanitarian and compassionate" grounds.
The following March, the hikers' families spoke out, saying that Bauer, Fattal and Shourd crossed the border by accident. Their loved ones are curious, peaceful, intellectual, they said. At that time, the hikers' mothers told journalists that Iran had not given them any information about their children.
At first, the families said they were trying to remain strong but kept a low profile.
But as Fattal, Bauer and Shourd remained behind bars in a country known for human rights violations, the families began to speak more.
In May 2010, CNN spent time with the mothers, who had formed a unique friendship bound by pain and the awfulness of not knowing what their children were experiencing.
"These are our children, and there's nothing quite as anguishing as thinking about your kids in prison in a country so far away and being unable to help them," Nora Shourd said.
Meanwhile, Nobel laureate Desmond Tutu pleaded for the Americans' release. Tutu revealed that he visited with the hikers in February 2010 and discovered that Bauer and Shourd were very ill.
"Their emotional state has deteriorated significantly. They are suffering from desperation and hopelessness and have considered the extreme step of a hunger strike," the retired South African archbishop said in a statement.
That month, the hikers' mothers wrote a letter to Iranian President Mahmoud Ahmadinejad, imploring him to free their children.
Other famous figures who have spoken out for the hikers' release include boxer Muhammad Ali, United Nations Secretary-General Ban Ki-Moon, Nobel Peace laureate Jose Ramos-Horta and former Colombian hostage Ingrid Betancourt.
Journalist Laura Ling, who was imprisoned in North Korea and later released, wrote on CNN that her heart ached for the detained hikers.
In summer 2010, the hikers' mothers traveled to Tehran for the first time and saw their children. Shourd's mother said that the three had been treated well. The mothers pleaded again their release.
The rounds of interviews about their children's fate carried one note of cheer: Bauer and Shourd had gotten engaged, the mothers said.
In July 2010, Clinton once again addressed the hikers' plight. She called their detainment "unjustifiable" and again demanded that Iran release them.
The month marked one year since the hikers' nightmare had begun.
In mid-September 2010, Sarah Shourd was freed on $500,000 bond in a deal that Oman and Switzerland brokered: Her release was due to medical concerns, but she'd still face spying charges.
Her imprisonment lasted 14 months. She turned 32 behind bars.
Shourd's family said she was seriously ill.
The week she was freed, Shourd arrived at the airport in Oman wearing a headscarf and looking thin.
"I will always associate (Oman) with the first breath of my freedom," she said. "The sweet smell of sandalwood. Standing by the ocean and listening to the waves."
In the months after her release, Shourd began opening up to Western media about her experience at Evin prison.
She told the New York Times that Fattal and Bauer's cell was 10 feet by 14 feet and that the closest thing to nature the men saw was a potted plant they passed in the hallway while being marched to and from their cells.
Shourd wrote a candid and emotional CNN editorial in December. She described how a female guard at Evin twice brought flowers to her cell. The woman would smile at her, seeming to try to comfort Shourd.
"When I broke down and cried, she would hold me in her arms, look me in the eyes and say, 'God willing, Sarah, it's going to be OK,' " Shourd wrote.
Shourd also wrote that she loves the Middle East and respects Muslim culture, and largely blamed the poor relationship between the U.S. and Iran for her 410-day detainment.
Earlier, in September 2010, she met with Iranian President Mahmoud Ahmadinejad while he was in New York attending sessions at the United Nations.
"I have no animosity towards him or the government," Shourd said at that time, adding that she had made a personal plea of Ahmadinejad to release her fiancé and their friend.
In July, on the eve of what Iran touted as the "final hearing" in Iran for Bauer and Fattal, family members rallied outside Iran's mission to the United Nations.
That month marked two years of imprisonment for Fattal and Bauer.
In the span of two years, the men have been allowed to make only three phone calls to their families.
In August, Iran sentenced Fattal and Bauer to eight years for illegally entering into Iran and for spying.
Then, last week, in a surprising twist to the hikers' saga, NBC's Today show interviewed Ahmadinejad , who said Bauer and Fattal will soon be released on humanitarian grounds.
Ahmadinejad said that it would be a "humanitarian gesture" and that the move would perhaps "solve problems."
Then, reports indicating the men would be released within days, but others that cast doubt. But then, on Wednesday came word that the hikers were freed, after 26 months.