(CNN) -- In Tehran's Evin Prison, American Sarah Shourd's lonely days must have seemed endless, filled with fear and uncertainty.
And anger toward her captors -- possibly even toward God, said journalist Roxana Saberi.
She, like Shourd, spent time in solitary confinement at Evin, a Tehran prison that has become notorious for harsh conditions, according to human rights groups.
"I felt anger toward God, as well. I said, 'Why are you punishing me? Why don't you save me?'" Saberi said Thursday on CNN's "American Morning."
Shourd, now in Oman awaiting travel back home to the United States after 14 months of detention, has yet to speak extensively about her own experiences. But Saberi knows the darkness of a cold cell in the hardline Islamic republic. And the joy of freedom.
Saberi, like Shourd, was accused of spying. She was sentenced to eight years in prison but was released after 100 days in May 2009.
She spent hours thinking: Is it going to ever end?
"It's hard because people, I think, need human interaction," said Saberi, who has written a book about her captivity.
"And when you're alone, you feel helpless. You might feel hopeless. At first you might be in a state of denial. You ask or tell yourself: 'I can't accept this. It is just a nightmare. It is going to end.'"
Saberi never knew whether she would be able to speak with her lawyer or when she might see her parents again.
"I didn't know what would happen to me and how long I would be there," she said. "You feel a sense of dependency upon others because you rely on the guards and your captors to help you get in touch with the outside world."
She was the same age as Shourd during her time at Evin. She spent her 32nd birthday in jail, in the midst of a hunger strike.
She chose to stop eating because her body was the only thing she could control. It was her only weapon against the regime.
The Iranians promised her freedom if she would admit she was a spy. They threatened her to keep her silent about her time in Evin.
It's not clear what was said to Shourd before her release Tuesday. But before departing Tehran she thanked the Iranian leadership, and then said: "I just want to assure you that my commitment to truth will not change when I go back to my country and I will never say anything but the truth to the media, and I will not succumb to any pressure."
Saberi said she was threatened by her captors if she spoke about "certain things." One guard told her he would sign her death warrant.
She said they told her: "I think you've seen how capable we are. We have agents all over the world and we can find you anywhere. You might be reporting in Afghanistan and we can kill you and make it look like you died in a car accident."
"I'm not the only one threatened like this," Saberi said. "I don't know if they did anything similar to Sarah, but she seems to be aware what she says can have repercussions for her two friends. It's a very sensitive case for her."
Shourd's fiance, Shane Bauer, 28, and the couple's friend, Josh Fattal, 28, remain jailed at Evin.
The three Americans were detained after they allegedly strayed across an unmarked border into Iran while hiking in Iraq's Kurdistan region.
Shourd's release was bittersweet. She said she will not rest until Bauer and Fattal are free. One day, Saberi hoped, Shourd will be able to speak of her experiences without mixed emotions.
CNN's Moni Basu contributed to this report.