"The targeting of gay persons in Egypt happens when someone, on the senior level, chooses for it to happen," an Interior Ministry official told BuzzFeed News.

Facebook: 847471988616716 Defendants in a courtroom cage during the 2001 Queen Boat trial, at which more than 50 men were accused of homosexuality.

On Tuesday, eight men went before an Egyptian judge in the country's highest-profile trial over homosexuality in more than a decade. The men stand accused of appearing in a video showing two men exchanging wedding rings, and face the possibility of more than three years in prison. Police hunted down the men early this month after the video blew up on Arabic social media and made headlines around the world. One of the men involved called into a popular TV show to say it was a joke, but politicians and much of the press treated it as a real same-sex wedding — a first for Egypt. Websites associated with the Muslim Brotherhood — the now-banned Islamist movement that just over a year ago was ruling Egypt — began featuring the wedding video as a sign of the moral decline in Egypt under the military-backed regime of President Abdel Fattah el-Sisi, who ousted it from power last year with the help of the army. Egyptian officials have been enforcing morality laws with a renewed zeal almost since Sisi took power. According to human rights activists in Egypt, at least 77 people have been arrested in well-publicized cases of "debauchery" or "violating public decency," the two charges used to prosecute people alleged to be LGBT since Egypt has no law explicitly against homosexual relationships, since October last year. Though Egypt mounted a crackdown on LGBT people just over a decade ago — most famously in the trial of more than 50 people in a case known by the name of the Nile River night club where many were arrested, the Queen Boat — there were only occasional arrests in the years since, and they were almost never prosecuted nor publicized in the press. That didn't change during the year that the Muslim Brotherhood's Mohamed Morsi was president, before Sisi deposed him. LGBT people have served as a convenient target as Sisi works to establish a new political order following the volatile years after the Arab Spring, when Mubarak was overthrown. Visible arrests of people on allegations of homosexuality help inoculate Sisi, a former general, from charges that he is too secular to govern, and bolsters his credibility with neighboring regimes. And it is also in the interest of the police themselves, who are only recently retaking responsibility for maintaining day-to-day order after years of military control. By making headlines through the arrest of alleged homosexuals — along with sex workers and atheists — police can show their bosses that they are keeping busy, while also showing the public they are standing up for Egyptian values after years of being associated with quashing democracy and public protest. "Egypt and the rest of the Arab world, in this post-Arab Spring moment, are all watching each other carefully," an official with Egypt's Foreign Ministry told BuzzFeed News, discussing the issue on the condition of anonymity. "Nobody wants to be accused of secularism or Western values — that is not what this post-Arab-Spring, post-Islamism moment means. We are still traditional societies, and the leadership today has to show this to its nation."

Spencer Platt / Getty Images A protestor in New York makes a sign denouncing the arrest of more than 50 in the Queen Boat case, August 15, 2001.

The first major arrests targeting LGBT people under Sisi happened in October, said Scott Long, the founding director of Human Rights Watch's LGBT program, who has been based in Cairo for the past 18 months while working on a book about sexual politics in the Middle East. Fourteen men were arrested in a raid on a bathhouse in the working-class Cairo suburb of El-Marg in apparent response to complaints from the neighbors, who ransacked the place after the raid. In November, soldiers manning a military checkpoint at a gated community called 6 October City alerted the police to a number of "effeminate-seeming" men entering the development. The police raided a private party in one of the houses, arresting 14 people. Those arrested are presumed by human rights activists to have been beaten or sexually assaulted, based on reports from LGBT people who have been arrested in the past or reports from family members. Once arrested, they have been given sentences of as much as 12 years in prison. These arrests weren't that different from the couple that had happened before Sisi took power, at least at first, Long said. It doesn't seem like police went looking for LGBT people, but rather took the chance to lock them up after they were "handed the situation on a silver platter." Things changed when these arrests started getting good press for the police, led by Al-Youm al-Saba, a newspaper with close ties to Sisi's regime. It helped bolster the police's support at a critical moment, just as the police were retaking control of the streets from the military, which took control when Sisi took power in June. Over the next six months, the arrests seemed to go from something police had stumbled upon to something they were seeking out. They were happening with increasing frequency — at least eight groups of allegedly gay men or transwomen were arrested over the next six months, and those arrested are presumed to have been beaten and possibly sexually abused, according to human rights activists. As the men facing charges in the wedding video went to court on Tuesday, Al-Youm al-Saba reported the arrest of someone with "a female body and male genitalia" on charges of prostitution, who appeared to have been entrapped online. The police seemed to be feeding news of the arrests to the press, even when they occurred in places outside Cairo where such raids wouldn't ordinarily make headlines. Ramy Youssef, an Egyptian human rights activist, said Egyptian LGBT people were used to living with the possibility they could be arrested if they were unlucky enough to cross a police officer. But now, he said, "The danger is more systematic, more organized, there is more violence in the air. You can sense it." In response to the crackdown, LGBT rights supporters are planning an online protest this Wednesday and Thursday in English and in Arabic under the hashtags #stopjailinggays and #ضد_حبس_المثليين. Lieutenant Muhammad Zaka'a, who heads the office in the Interior Ministry that oversees the enforcement of Egypt's morality laws, denied that his department is actively cracking down on LGBT people in an interview with BuzzFeed News. "We are doing our business as usual," Zaka'a said. "I have been serving more than 25 years and it is natural that people deviate from the ethical norm and we deal with them, be it prostitution, or homosexuality or any other case." But another Interior Ministry official, who spoke on condition of anonymity due to the sensitivity of the topic, confirmed LGBT rights supporters' suspicions that the police were acting on instructions from the top. "The targeting of gay persons in Egypt happens when someone, on the senior level, chooses for it to happen," the official said. "The police do not act on these raids on their own. They do not go and round up the gay persons on their own. They do it when someone orders them to move and arrest people on this issue."

The wedding video went viral in late August. It showed two men exchanging rings and kissing, while several other men ululated — the traditional sound of a wedding in Egypt. The video had been shot on a party boat on the Nile river many months earlier, and the close camera angle and the way it pans across the small group suggests it was shot by a friend of those involved. There is no sign anyone was worried about being filmed on this person's cell phone. It's not clear how the video got online; perhaps the person who shot it was angry at some of the men involved. Some LGBT activists have speculated that it might have been leaked by the police, although that's something Lieutenant Zaka'a denies. Two things made the video so explosive, said Youssef. Two men undergoing wedding rites would be shocking on its own, perhaps giving the impression that Egypt had been corrupted by Western nations where same-sex marriages are recognized. But the fact that the men looked masculine made it even worse, as they could be anyone — none of the men in the video looked like they would have any trouble blending in on the street or around a family dinner table. With the video, Youssef said, "Everybody knows that there are gay people who get married, or who get together, or who have sex, and they look just like everyone, like their sons, and like their nephews, and like their husbands…. That's what made it so scary." Zaka'a also alluded to the men's masculine appearance in explaining why the Ethics Ministry responded so quickly to the video when it surfaced online. "I think you noticed that the guys in the clip had beards," said Zaka'a. "Men kissing each other from the mouth and others trilling in a wedding celebration of two men on a boat... We arrested them and turned them over to the prosecution." The Muslim Brotherhood pounced on the image, ratcheting up anxiety about the video to a fevered pitch. Azza El-Garf, who was a member of parliament from the Brotherhood's political wing before the group was banned last year, tweeted, "For the first time in Egypt, we hear of gay marriage. The coup leaders embrace the Western agenda of demolition and decay of religion, and Egypt is converted into a brothel."