He is out on bail now, after 412 days in prison, and tonight on CBC TV, the fifth estate presents an interview Gillian Findlay recorded with Fahmy on Tuesday, four days after his release.
Fahmy, an Egyptian-born Canadian, says he "will do whatever it takes" not to go back to prison, particularly now that he knows what prison life in Egypt is really like.
But he also says, "it'd be very naive for anyone to believe that we are going to be acquitted."
On Dec. 29, 2013, while working for the Al Jazeera English news network, Fahmy and his colleagues, Peter Greste from Australia and Baher Mohammed of Egypt, were arrested and eventually charged with belonging to and aiding a terrorist organization, meaning the Muslim Brotherhood, the party that ran Egypt for two years before the army took over in 2013 in the midst of a populist uprising.
Six months later, in what Fahmy's lawyer, Amal Clooney, as well as outside observers, called a show trial, the three were convicted.
Greste won't be part of the new trial that his two colleagues will endure. Earlier this month, he went from prison to Australia, released on a presidential decree following a direct request from Australian Prime Minister Tony Abbott to Egypt's President Abdel-Fattah el-Sissi.
Cell full of jihadists
After their arrests, Greste and Fahmy were initially held in a very crowded police station cell with barely space to turn around, Fahmy tells Findlay.
Then he was sent to the terrorist wing of a super-maximum facility known as the Scorpion Prison. His fellow inmates included Muslim Brotherhood leaders and "really hardcore jihadists who just returned from Syria and Libya."
At times he was handcuffed to some of those jihadists, despite a broken arm.
His cell was infested with insects and freezing in winter.
While at Scorpion, he spent a month in solitary confinement, a month without seeing the sun, no way to tell time and no idea what would happen.
Fahmy says it was tough, but he was able to keep going with the support of other prisoners.
"Inside, all the masks drop and there's no more classification of who you are and what you're doing. It's about survival."
Fahmy told Findlay about his earlier challenges in getting interviews with jihadists and then they were right in front of him. So he ended up "picking their brains and trying to figure out what they're doing and what-not."
In jail, he joked, "you don't have to worry about them killing you or beheading you."
Fahmy told Findlay that it is important to have a sense of humour inside prison, although he does concede the jihadists didn't have much of one.
Critical to his survival in prison was the support he received, from other prisoners, he said, as well as that from his family, the Canadian embassy and the media. "Knowing that somebody out there is vouching for you and keeping your story alive, that's what really kept me going."
Pawns in a feud
Fahmy said he is very grateful for the efforts of embassy staffers in helping with his case, but that he wishes Prime Minister Stephen Harper would do more.
He's similarly grateful for the international #FreeAJStaff Campaign started by Al Jazeera, but he is also critical of his employer for what he calls its "epic negligence" in his case, both before and after his arrest.
He sees himself as a pawn in the feud between Qatar, which owns the Al Jazeera networks, and Egypt. Qatar backed the Muslim Brotherhood government, which was overthrown in the 2013 military coup.
"Because of this geopolitical [feud] and the bigotry between the two countries, Egypt and Qatar, and the ongoing political challenges between the two countries, we were pawns at the end of the day."
ALSO ON HUFFPOST: