In prison, one of the greatest challenges is psychological. Even though conditions can be pretty terrible, as long as you have basic nutrition, clean water and shelter you can physically survive. But it is the sense of hopelessness and isolation that can be mentally crippling, and even fatal.
So when we learned, several months after our arrest, that a global campaign had been launched to free us, it made all the difference in the world.
In 2013 we had been arrested in Egypt while working as journalists for Al Jazeera and charged with a string of politically-motivated offences relating to our work. In those cold, dirty cells, with no idea what the future held, there was not much to be positive about, which is why it meant so much when the first snippets filtered through that the #FreeAJStaff campaign was getting world-wide traction.
Besides reminding us that we had not been forgotten, it made us realise we were part of a cause far bigger than ourselves. It helped give those long days meaning and lifted us when we were at our lowest. And, more importantly, ultimately the campaign also helped end our incarceration.
People around the world had come together in extraordinary numbers to call for our freedom because they recognised the injustice of what we were going through. They saw how we were victims of a campaign to silence the press, and they took a stand to support us. And it worked.
Now we urgently need to harness that energy once again. A tragedy is slowly unfolding in Turkey. Independent journalism is being systematically stamped out. Prison doors are slamming, media outlets are being boarded up, and a disturbing silence is falling over what was once a vibrant and diverse media landscape.
Since the failed coup attempt in July 2016, President Recep Tayyip Erdoğan has launched a crackdown on freedom of expression so severe that independent journalism is in its death throes. At least 156 media outlets have been shut down and an estimated 2,500 journalists and other media workers have lost their jobs. Yonca Şık, whose husband, investigative journalist Ahmet, has been remanded in custody since December, says "Ahmet's imprisonment is a message to others: Speak out if you dare."
All of these measures against independent journalism are painful to watch. But what hit closest to home are the stories of the more than 120 media workers arrested in the wake of the coup attempt and held in pre-trial detention.
In the initial shock following our own arrests in Egypt, we thought there had been a terrible mistake that would quickly be corrected. We could never have imagined that we would go on to spend hundreds of days in prison awaiting trial, in terrible conditions.
The Egyptian prisons where we languished were overflowing with many people who opposed or challenged the government. We understand all too well what it is like to be in Turkey's prisons right now, and how our colleagues must be feeling. When we weren't crammed into cells with so many other men that we couldn't sit down, we were in solitary confinement where we often feared losing our minds. The loneliness and boredom are hard to describe.
Although the situation facing journalists jailed in Turkey may not be identical to ours, we understand their despair and frustration. What makes the situation in Turkey especially sinister is the fact that the Turkish government continues to deny that journalists are being jailed for their work. The stories and identities of these individuals are being erased. This is why it is so vital for those of us on the outside to take a stand on their behalf.
#FreeAJStaff started as a small Twitter campaign, but within weeks it had grown into a global movement. It brought out the best in social media: the urgency, the rolling momentum, the championing of a cause which might otherwise have been crushed. In the end, it achieved more than three billion impressions.
In the darkest moments of our incarceration - when we felt locked in a hopeless battle with the machinery of injustice, when we had forgotten what a sunset looked like - it sometimes felt like we had stopped existing. It would have been easy to fade away. What kept us going was the knowledge that we were on people's minds.
The full realisation of what that campaign meant to us in our time of need is why we are backing the #FreeTurkeyMedia campaign. We want all those journalists languishing behind bars in Turkey to know that we are with them. We want them to know that the days they spend there, however dreary, however frightening, are not in vain.
They are on the frontlines of freedom of expression - the public's right to know and the importance of a free press in a functioning society, not just in Turkey but around the world.
Sometimes it is hard to appreciate something until it is taken away from you. But remember: a society where people do not have the right to report freely is a society at risk. Without independent journalism, there would be no free public debate; no holding of the powerful to account, no oversight or investigation into human rights abuses.
Detaining journalists has a chilling effect on everyone, making them afraid to speak out. So while #FreeTurkeyMedia is about getting journalists out of prison, it is also about creating a better future for human rights in Turkey and sending a clear message to those around the world who seek to silence free speech.
For more than 400 days behind bars in Egypt, we were fortified by the knowledge that people around the world were campaigning for our release. If it was right to speak out for us and demand #FreeAJStaff, it is right to speak up for all journalists jailed simply for doing their jobs. That is why we have joined the call to #FreeTurkeyMedia.
Peter Greste is a freelance journalist
Mohamed Fahmy is a columnist for the Toronto Star and a freelance journalist