All eight men accused of appearing in an online video of a purported same-sex wedding celebration aboard a boat on the Nile River in Egypt were convicted and sentenced to three years in prison on charges of debauchery by the Qasr Al-Nil Misdemeanor Court in Cairo Saturday, according to state-controlled Ahram Online. The online video went viral on social-media sites in August, and the men have been detained since September.

The judge hearing the case ruled the eight men also would be subject to police supervision after the completion of their prison sentences, Reuters reported.

A man who identified himself as one of those appearing in the video denied the allegations about a gay wedding in an interview with the privately owned Rotana Masriya television channel in early September, Ahram Online said. He described the event as a birthday party he was throwing for a friend, who he gave a silver ring as a birthday gift.

However, Prosecutor-General Hisham Barakat claimed the video confirmed it showed two men getting married, the prosecution said in a statement cited by Ahram Online.

The sentences greatly upset the families of the defendants, who demonstrated outside the courthouse and were subsequently cleared by police, Reuters said. Meanwhile, the defendants stood silent in the courtroom cage as the verdict was read, one of them holding a copy of the Koran, the news agency said. The sentences can be appealed.

The BBC’s Middle East editor, Sebastian Usher, reported Islamists had led the chorus of outrage against the online video, saying it proved moral standards in Egypt had dropped since Islamist President Mohammed Morsi was deposed last year.

The largest crackdown on homosexuals in Egypt took place in 2001, when police raided a floating disco called the Queen Boat, according to Reuters. More recently, an Egyptian court in September sentenced six allegedly homosexual men to two years in jail with labor on charges of debauchery, Ahram Online said.