The award-winning Egyptian photojournalist Mahmoud Abou Zeid, who is widely known as Shawkan, has been released after five years in prison.

Shawkan was arrested in 2013 while covering a deadly crackdown by security forces on a sit-in by supporters of ousted President Mohammed Morsi.

Last September he was convicted in a mass trial and handed a five-year jail sentence, which he had already served.

Amnesty International said he was detained solely for doing his job.

"Mahmoud Abou Zeid's long overdue release brings to an end a painful ordeal for him and his family," Najia Bounaim, the human rights group's Middle East and North Africa director, said on Monday.

"As a prisoner of conscience, he should never have been forced to spend a single minute behind bars - let alone five-and-a-half years."

Ms Bounaim added that he still faced "outrageous" probation measures that would require him to spend 12 hours of each day at a police station - from 18:00 to 06:00 - for the next five years.

Shawkan, who was awarded the 2018 Unesco/Guillermo Cano Press Freedom Prize, vowed to continue working as a photojournalist despite the restrictions.

"All journalists are at risk of being arrested or killed while doing their work. I am not the first and I will not be the last," he told Reuters news agency.

Shawkan was arrested in Cairo's Rabaa al-Adawiya square on 14 August in 2013 while on assignment for the London-based photo agency Demotix.

On that day, at least 817 people were killed as security forces violently broke up a sit-in in the square by thousands of Morsi supporters, who had gathered there to protest against the overthrow of the president by the military the previous month.

Two foreign journalists were arrested along with Shawkan, but they were released.

Shawkan and 738 other people were subsequently prosecuted collectively for the killing of 17 men, including seven police officers, as well as other charges including illegal gathering, incitement to break the law, and involvement in violence.

At their trial in September, 75 defendants were sentenced to death, 47 were given life prison terms, and 612 were sentenced to between five and 15 years.

Shawkan was handed a five-year term plus a fine for property damage. He could have been released then on time served, but a six-month term was added to his sentence because he could not afford to pay the fine.

The Committee to Protect Journalists welcomed the release of Shawkan, but it called on the Egyptian authorities to "end their shameful treatment of this photojournalist by removing any conditions".

"The Egyptian government should take steps immediately to improve its image, which has been badly tarnished by this unjust imprisonment - and it can start by releasing all journalists jailed in relation to their work," said Sherif Mansour, the group's Middle East and North Africa co-ordinator.

At the time of CPJ's last prison census at the end of 2018, Shawkan was one of 25 journalists jailed for their work in Egypt.

Human rights activists say as many as 60,000 people have probably been arrested or charged since 2013 in a crackdown on dissent overseen by the current President, Abdul Fattah al-Sisi. He has denied that any are political prisoners.