Eight Egyptian men were sentenced to three years in jail on Saturday on charges of spreading indecent images and inciting debauchery after they appeared in an online video purporting to show the country’s first gay marriage ceremony.

The judge ruled that they would also be subject to police supervision following the completion of their prison sentence.

The sentence was met with uproar from the families of the defendants, who demonstrated outside the courthouse in downtown Cairo and were cleared by police. The defendants, who had denied the charges, stood silent in the court room cage as the verdict was read, one of them holding up a copy of the Koran.

Gay marriage is not legal in Egypt, a conservative Muslim society where the footage, which went viral on social media sites in August, caused a stir online.

Though homosexuality is not specifically outlawed in Egypt, discrimination is rife. Arrests of gay men occasionally make headlines and the accused are typically charged with debauchery, immorality or blasphemy, drawing criticism from rights groups.

The footage, which was posted on YouTube, appears to show a group of men celebrating a gay wedding on a Nile riverboat.

The men were first charged in September when a public prosecutor’s statement said that the images were “humiliating, regrettable and would anger God”, concluding that they constituted a criminal act. The prosecutor ordered the coroner to carry out physical examinations as part of the investigation.

The sentence can be appealed.

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.

Reuters