Mahmoud Abu Zaid, popularly known as "Shawkan," was convicted of involvement in a 2013 sit-in by Islamists that was broken up by Egyptian security forces in an operation that left hundreds dead.
His case comes as Egypt, under President Abdel-Fattah el-Sissi, has launched an unprecedented assault on reporters and the media in recent years, imprisoning dozens and occasionally expelling some foreign journalists.
Shawkan was taking photos at the Rabaa Al-Adawiya Square in Cairo where Muslim Brotherhood supporters were holding a sit-in protest in August 2013 to denounce the ouster and detention weeks earlier by the military of Egypt's freely elected but divisive Islamist President Mohammed Morsi.
"I was heading out to take photos. I come back to my home after five years," Shawkan, 32, told The Associated Press at his home in Cairo's neighborhood of Fisal, shortly after his release.
"I feel like I was born again, I feel relieved," said his mother, Reda Mahrous. "I used to stay awake at night thinking, telling myself that Mahmoud will come back today or tomorrow."
Shawkan's lawyer, Taher Abuel-Naser, said he was released from a police station earlier in the morning. An Egyptian court had ordered Shawkan's release last September after he had served out his term, but he remained behind bars for an additional six months in lieu of paying a fine for alleged property damages incurred during the Rabaa Al-Adawiya crackdown.
Shawkan said that under his sentencing and following his release, he has to report to the nearest police station and spend every night there from 6 p.m. till 6 a.m. for the next five years because he has been remanded under "police observation" for that time.
He is also prohibited from managing his financial assets and property for the duration of those five years.
Amnesty International called such measures "outrageous" and said they "should be lifted immediately."
"Mahmoud Abou Zaid has been the victim of an appalling injustice and the authorities must offer full reparation for this outrageous violation of his human rights," said Amnesty's Najia Bounaim.
Despite the restrictions, Shawkan said he would continue working as a photojournalist.
"I am not the first or the last journalist to be detained," he said.
The Committee to Protect Journalist welcomed his release and urged Egyptian authorities to "end their shameful treatment of this photojournalist by removing any conditions to his release." Shawkan was honored with CPJ's International Press Freedom Award in 2016.
"The Egyptian government should take steps immediately to improve its image, which has been badly tarnished by this unjust imprisonment," said Sherif Mansour, CPJ's Mideast and North Africa coordinator.
Egypt remains among the world's worst jailers of journalists, along with Turkey and China, according to CPJ. In December 2018, CPJ's annual prison survey found that at least 25 journalists are in prison in Egypt, and that the country leads the world for charging journalists with publishing false news.
Egyptian authorities have also silenced virtually all independent or critical media. Under legislation passed in July, the media regulatory agency can use the "fake news" label to shut social media accounts with more than 5,000 followers, without having to obtain a court order. It also can block websites with content deemed a threat to national security.
Since late 2017, some 500 online sites have been blocked as part of the state's growing control over the media, according to a recent report by an Egyptian watchdog, the Association for Freedom of Thought and Expression.
Authorities say the measures are necessary to prevent instability as Egypt struggles to revive its economy and combat an Islamic insurgency in northern Sinai. El-Sissi has frequently suggested political rights are less important than the right to food, housing and other necessities.
Pro-government media frequently portray negative coverage as part of foreign plots to spread chaos, and sometimes accuse foreign media of promoting a negative image of Egypt. Cameramen or even reporters with notebooks attempting to conduct interviews in public can face harassment from crowds and policemen.
A general-turned-president, el-Sissi has rolled back many of the freedoms won by the 2011 uprising against longtime autocratic President Hosni Mubarak. He has silenced most dissenting voices in the media and placed severe restrictions on civil society groups. The Muslim Brotherhood has been outlawed as a terrorist group.
The New York-based Human Rights Watch hailed Shawkan's release but also used the occasion to call attention to Egypt's human rights record.
"Since Shawkan's arrest in 2013, Egypt has descended further into darkness and suppression of a free media, and while we joyfully celebrate his release, it's also a reminder of how far Egypt has fallen since 2011," Said Sarah Leah Whitson, HRW's executive director for the Mideast and North Africa.
Last April, the United Nations' cultural agency ignored warnings from the Egyptian government and awarded Shawkan the World Press Freedom prize.
At the time, UNESCO's jury president Maria Ressa said the prize, which recognizes the promotion of press freedom especially in the face of danger, "pays tribute to his courage, resistance and commitment to freedom of expression."