A court in Egypt has sentenced eight men to three years in prison each for showing their faces in a video that purportedly showed a same-sex wedding party. The video was posted to YouTube in September and shows a group of people cheering on two men who exchange rings and quickly kiss each other during what looks like a party on a boat in the Nile. The men, who will be subject to police supervision after their release, were convicted for “inciting debauchery” and spreading “indecent” images, reports Reuters.

The eight men were detained in September after the country’s top prosecutor said the video was “shameful to God” and “offensive to public morals,” reports the Associated Press. The arrested men were then subjected to “forensic anal examinations,” which Egyptian authorities often use to prove homosexual conduct, reported Human Rights Watch (HRW) at the time of the arrest. The anal exams not only violate international conventions on torture but are also useless in determining whether consensual anal sex has taken place. It didn’t seem like the court much cared about the results anyway, because a government medical official said that based on the tests, the men were “not homosexuals.”

The campaign against the men who appeared in the video was led by Islamists who called it proof that moral standards had decayed since Mohammed Morsi was removed from power. “The authorities that replaced the Islamists, led by current president Abdul Fattah al-Sisi, may want to prove to Egyptians that they can be just as conservative on social issues,” notes the BBC. Graeme Reid—Lesbian, Gay, Bisexual, and Transgender (LGBT) rights director at HRW—also sees the prison sentences as a cynical populist ploy by the government. The sentencing “is the latest signal that the new government will prosecute anyone to try to bolster its support,” Reid said, according to Daily News Egypt.