A four-month trial ended Wednesday with jail terms for 23 Egyptian men who were found guilty of charges related to gay sex, in a case that has drawn international condemnation from human rights groups.
The sentences varied from one to five years.
Another 29 men were freed by the emergency state security court, and left crying with joy, said agencies.
The freed men accused the Egyptian media of sensationalism and destroying their reputations, said AP.
Human rights activists, who closely watched the case of the 52 men, sharply criticized the trial.
Amnesty International accused Egypt of prosecuting people for their sexual orientation and said the court was not independent, according to AP.
AFP said the high state security court handed down the maximum jail sentence of five years in prison to the main defendant, Sherif Farahat, for "scorning religion" and "sexual practices contrary to Islam."
The other lead defendant, Mahmud Ahmed Allam, was sentenced to three years in prison for the charge of scorning religion.
The remaining 50 defendants, most of them in their early 20s, had been charged with "practicing debauchery with men."
Twenty of them were sentenced to two years in prison while one was jailed for a year – Albawaba.com