Ramy Yosef, a 21-year-old man from Egypt's Nile Delta, came out on Twitter last year. His family responded by forcing him from their home.

Tarek, 28, recounts being beaten and robbed for "dressing like a faggot"—and avoiding the police for fear that they, too, would target him for being gay.

Though homosexuality is not illegal in Egypt, coming out has always been complicated and even dangerous.

But now, even as Egypt becomes increasingly Islamized under Muslim Brotherhood rule, young gay activists are fighting back by building a rights movement and initiating a more public conversation about a subject long kept under wraps.

Tarek, who asked to withhold his last name for fear of retribution, is spearheading an awareness campaign. Yosef, meanwhile, recently started an anti-homophobia campaign on Twitter, which quickly went viral—within hours it had drawn thousands of re-tweets and mentions, quickly gaining support from mainstream activists and celebrities, with some people uploading photos of their partners—an unusual public display in what is still a conservative country. "It was overwhelming," Yosef says. "It's the right time to bring a community together."

Under former dictator Hosni Mubarak, the state persecuted gays and lesbians, charging them with offenses including "debauchery," "contempt of religion," and even "Satanism." In 2001, in what eventually became the notorious "Queen Boat" trial, dozens of men were arrested on a party boat on the Nile and subjected to "anal testing" and other torture before they were tried. The raid and the subsequent court case was the beginning of a government-led witch-hunt in which security forces posed as gay men online; those arrested were often brutally tortured.

The vague and abusive "debauchery" legislation, which Mubarak used to imprison hundreds of people, remains embedded in the penal code. The Ministry of Interior "Vice Squads," which during the early 2000s cruised downtown Cairo picking gay men off the streets, still exist. And the government's attitude—in public at least—remains unforgiving. "Gays are not real people," an Egyptian diplomat said at the United Nations Human Rights Council in Geneva last year.

But gay activists say that even though Egypt has become more Islamized, something has shifted, and there is renewed hope for their cause.

During Egypt's 2011 revolution, lesbians and gays congregated on Tahrir Square, setting up unofficial headquarters of sorts near the Kentucky Fried Chicken. "For the first time, we weren't aliens," Tarek says. "The main challenge was to prove that, ‘yes, I sleep with men, I may be effeminate—but you have to respect me because I'm standing next you in this fight.’"

Riding the revolutionary wave after the ouster of Mubarak, some gay activists called for an LGBT stand on Tahrir. But those pushing a political-rights agenda were quickly silenced by others in the community who feared their demands would be met with a severe backlash.

Today, despite occasional disagreement about the best path forward, Egypt's gay scene is flourishing like never before—some say because the government and the ruling Islamist elite are too distracted with other problems, including security, division, and the troubled economy, to pay attention to the rights demands.

Mido Hussein, a 26-year-old man who hails from the Nile Delta, said that Western websites and apps like Hornet and Grinder are popular among Egypt’s youth but so are more public and visible meeting spots. Across Cairo and Alexandria, popular bars now regularly host unofficial gay nights. Private parties are legion—and popular with everyone. “We meet in bars, cafes, gyms, the waterfronts in Egypt's coastal cities," he says.

The social scene for lesbians—on- and offline—is also flourishing, even though many gay women are forced by their families to marry against their will.

As a consequence, many women live double lives, throwing lesbian parties when their husbands are away on business trips. Women also meet in salons, beauty parlors, or cafes, sometimes bringing their children along to meetings with girlfriends as "camouflage,” says Kholoud Bidak, a leading lesbian women's rights activist.

In Egypt, many women who have sex with other women don’t identify themselves as lesbians, and in public, their orientation is often dismissed as a passing "phase,” even if a quick browse online suggests that language reveals much. Lesbians are referred to as "sett meet aragil"—a lady who equals a hundred men—a name for both lesbians and strong women, Kholoud explains.

At the same time, many gays and lesbians express discomfort when confronted with the word "community," arguing the scene is too fragmented to build any kind of consensus on the ways and means, segregated as it is by class and gender, among other things.

To say that the scene in Cairo is a far cry from New York would be an understatement. And although many express hope for the future and a burgeoning sense of solidarity, Tarek warns that Egypt’s gays may, once again, be targeted for political gain, much as they were during Mubarak’s reign.

"We have an Islamic government, an interior ministry trying to purify its image, and a conservative masculine society," he says.