A court in Egypt on Saturday sentenced eight men to three years in prison for appearing in a video alleged to show a gay marriage, the BBC reported.

All eight had denied charges of inciting debauchery and offending public morality.

The video, which was posted to YouTube in September, shows two men exchanging rings on a boat in the Nile.

Though homosexuality is legal in Egypt, it remains a taboo. Police raids on gay venues have risen in recent months, noted the BBC, which added that the sentence was met with uproar from the families of the defendants.

Islamists had led the chorus of outrage against the video, saying that it proved moral standards had dropped since Islamist President Mohammed Morsi was removed from power last year.

The authorities that replaced the Islamists, led by current president Abdel Fattah al-Sisi, may want to prove to Egyptians that they can be just as conservative on social issues, noted the BBC.

In April, four men were convicted and sentenced to eight years in prison for debauchery after holding parties that involved homosexual acts where women's clothing and makeup were found.

The largest crackdown on homosexuals in Egypt took place in 2001, when police raided a floating disco called the Queen Boat. Fifty-two men were tried in the case that drew widespread criticism from human rights groups and Western governments.