But there is more than just distraction at play. A talk-show host who suggested that both terrorism and homosexuality were being used to “ruin our youth” by a nameless external enemy offered perhaps the most honest explanation for this vicious round of homophobia in Egypt: the conflation of a security threat with a “moral” threat.

After the Mashrou’ Leila concert — attended by an estimated 35,000 — a parade of TV personalities pleaded with the regime to “save our youth” from homosexuality. Egyptian authorities promptly barred the group from performing again. In June, Jordan had done the same.

Across the Middle East and North Africa, increasingly bold expressions of sexual freedom are clearly unsettling regimes accustomed to being guardians not just of “national security” but also of our bodies and sexualities. Mr. Sinno is unapologetically “brown, queer and from a Muslim family” by his own description. Mashrou’ Leila, with its sexually subversive songs — which include references to gender fluidity and Abu Nawas, an eighth-century Arab, and Sappho (both known for poems that celebrate same-sex love) — have become icons for a beleaguered but determined L.G.B.T. community and a lightning rod for our moral guardians.

Armed with social media and audacity, more people are questioning taboos around religion and sexuality. There are online L.G.B.T. accounts offering information and solidarity, in Arabic and English. One is the newly formed Alliance of Queer Egyptian Organizations, which coordinated protests outside Egyptian embassies and consulates on Oct. 19. My.Kali, one of the region’s first L.G.B.T. magazines, started publishing in 2008. In July, a video went viral showing an Egyptian lesbian (who lives in the United States) talking about her relationship with a woman and her father’s reaction to her coming out.

Egypt, of course, is far from alone in its witch hunt. From Chechnya to Azerbaijan and from Tanzania to Indonesia there are similar crackdowns by governments obsessed with policing people’s sexuality. (And let’s not forget that President Sisi’s booster, President Trump, is no friend to L.G.B.T. rights.)

Morality crusades unite military regimes and religious zealots alike. Mr. Sisi, a former army general who became president after forcing out Mohamed Morsi, of the Muslim Brotherhood, understands the potency of connecting the catchall “national security” to “inciting debauchery” as a deliberate reminder that the Islamists do not hold the copyright on piety. (Mr. Mubarak, too, often vaunted his regime’s religiosity to outdo its Islamist rivals.)

On Oct. 19 — a day of global solidarity with L.G.B.T. Egyptians — I saw Mashrou’ Leila in concert in Montreal. That day, a protest had been held outside the Egyptian Consulate there. Some concertgoers flew an Egyptian flag alongside a rainbow flag. Mr. Sinno told the audience that the best way to fight the crackdown in Egypt was to keep up international pressure. He understands the importance of visibility — for safety and for solidarity.

“Getting just one email from some queer kid in Tunisia who says something super emotional,” Mr. Sinno had told me this summer, after he was banned from performing in Jordan, “even just one of those messages justifies taking on the Jordanian state.” He can now add Egypt to that list of states he’s taking on.