CAIRO -- Mohamed Fahmy, a journalist who was released from prison in Egypt last month, posted on social media that he left the country Tuesday.

Fahmy posted a photo on his Twitter account of the Canadian ambassador escorting him to the gate at Cairo airport, calling it "a glorious end to our battle for freedom." He had posted a day earlier that his name had been removed from a government no-fly list.

Fahmy's departure ends his nearly two-year ordeal in a case that raised questions about Egypt's commitment to democracy and free speech.

He was arrested in December 2013 with two other Al Jazeera English colleagues and sentenced to three years in prison in a retrial earlier this year for airing what a court described as "false news" and coverage biased in favour of the now-banned Muslim Brotherhood. The case was widely condemned by rights groups. He and his colleague Baher Mohammed received a presidential pardon last month.

Fahmy gave up his Egyptian citizenship during the trial in hopes of being deported to Canada. But in an open letter to Egypt's President Abdel Fattah el-Sissi published last month in a Cairo daily, he appealed for the restoration of his citizenship, saying he relinquished it under duress.