Seven Egyptian men have been arrested and accused of inciting debauchery as well as undermining public morals after appearing in a gay wedding video which was posted online.
According to the public prosecutor, the images of the footage were "humiliating, regrettable and would anger God," and "constituted a criminal act".
The prosecutor told police to arrest the men and ordered the coroner to carry out medical tests, widespread in Egypt, to identify homosexuals.
The prosecutor said the men would be held for four days pending a full inquiry.
According to news agency Mena, two more men were still being sought by the authorities.
The video – which appears to show a group of men celebrating a gay wedding on a Nile riverboat –was recorded in April but posted on YouTube only in August.
Although the practice is not illegal in Egypt, homosexuals are often arrested by the authorities and charged with debauchery, immorality or blasphemy.
Egyptian activists interviewed by the Guardian newspaper in April said they had documented at least nine raids against homosexuals by Egyptian authorities since October 2013.
They added that in seven of those raids, people were arrested at home not in public, suggesting that the government has now begun a crackdown against gay Egyptians.
Last April, four men were convicted and sentenced to eight years in prison for debauchery, as they held "deviant" sex parties in which men allegedly wore women's clothes and makeup.
In 2001, Egyptian police raided a club in Cairo, where 52 suspected gay men were arrested and charged with "habitual debauchery" and "obscene behaviour".
According to a Human Rights Watch's report, Egyptian men suspected of being homosexual are at risk of being harassed, arrested and even tortured.