When the crackdown began, LGBT people across Egypt began dropping off dating apps, stopped meeting friends and charted their escape.
As police in the conservative, Muslim country rounded up dozens of people over the past two months, intensifying their persecution of the country's LGBT citizens, a wave of paranoia and fear swept over the community. In interviews with ABC News, half a dozen LGBT people in Egypt described feeling trapped and terrified that they, too, could end up imprisoned and tortured by the security services.
For one 32-year-old man from Cairo, taking refuge in the desert seemed safest.
The man, who teaches young adults about gender studies, identifies as pansexual, where one does not prefer one specific gender or orientation over another. He moved to Egypt's Sinai Peninsula and started volunteering at a guest house. Like others interviewed by ABC News, he requested anonymity, worried he could be detained for speaking out.
"I want to be forgotten for a bit," he told ABC News. "That's exactly how I feel right now."
He said his boyfriend attended a Sept. 22 Cairo concert by the Lebanese rock band Mashrou' Leila, where several people -- including someone he knew -- held up rainbow LGBT pride flags. Images of the flags went viral on social media in Egypt, prompting anti-LGBT hysteria in Egyptian mass media and, according to the Egyptian Initiative for Personal Rights, a human rights group, the arrests of at least 75 people.
At least 20 have have been given prison sentences ranging from six months to six years after "significantly expedited trials," and at least five men received anal examinations that amounted to torture, Amnesty International said. Human rights groups have issued harsh condemnations.
"I didn't want to go out, I didn't want to see anyone," the man from Cairo said. He spends his time binge watching television, avoiding exercise and friends.
"I feel like a reject," he said. "I lost my belonging to this place."
Last week, just over an hour down the road from his desert sanctuary, Egypt hosted the World Youth Forum, an international conference in the resort city of Sharm El Sheikh that, according to its website, aimed to promote "peace, prosperity, harmony and progress." Egypt's president, Abdel Fatah El Sisi, attended and asked the young people participating "to deliver a message of peace and tolerance from Egypt to their countries," according to his office.
But at the guesthouse, the pansexual Egyptian felt paralyzed and persecuted -- and regretful. He had spent time in Europe and even applied for asylum there earlier this year, ultimately growing homesick and unhappy with the process, coming back to his homeland.
But his countrymen's hatred threw him into depression, he said.
"I wake up every day asking myself, 'What the f--- am I doing here?'" the man, who has since left Sinai for another Egyptian city, said. "The crackdown awakened the homophobia of the masses. People are cheering for the arrests of the gays."
Analysts told ABC News the current crackdown comes in the context of increased oppression against a variety of minority, political and religious groups in Egypt since 2013, when the military took control of the government.
LGBT people have been targeted in particular, not only during the past several years, but for decades. It's been worse lately, though. The Egyptian Initiative for Personal Rights, a local human rights group, said at least 232 people who were LGBT, or perceived to be, were arrested between 2013 and 2017.
Human rights activists have warned of police officers using gay dating apps to entrap users, luring them to meetings only to arrest them. Other methods, activists said, involve forcing detainees to reveal acquaintances' names and rounding up people who have visited imprisoned LGBT people.
Users also tell stories of straight civilians using apps to find LGBT people, beating them and blackmailing them for money.
Several gay dating app companies and LGBT Egyptians said they did not know of an instance where police used entrapment in the current crackdown, but they did worry about the practice continuing.
The spread of smartphones and ubiquitous internet use have created new risks, according to Scott Long, a longtime human rights activist focusing on LGBT issues.
"This makes it really easy, on the one hand, for homophobic propaganda from online media to sort of show up in your face, and I think it's helping to indoctrinate the public," Long, who lived in Egypt from 2012 to 2016, told ABC News. "And I think, on the other hand, the apps have made gay and trans people more vulnerable."
A variety of gay dating apps have proliferated in Egypt in recent years, giving LGBT people a new way to make friends and chase romance.
The arrests have led several of the apps to re-examine the protections they offer their users in Egypt.
The app Hornet sends general safety recommendations to its Arabic-speaking users, which the company said number over one million, like holding video calls before meeting in person and checking in with friends before and after dates.
When users of Scruff travel to one of more than 80 countries with limits on same-sex acts, including Egypt, they receive an alert and information about restrictions. In areas with those advisories, users' precise locations are automatically hidden, and they can flag suspicious profiles.
"At the end of the day, people -- gay people, straight people -- they're going to want to connect, they're going to want to meet," Eric Silverberg, Scruff's CEO, told ABC News. "No regime, no matter how repressive, can stop that fundamental human need for companionship and for relationships."
Grindr, another popular app, regularly shares safety tips with its users in Egypt and in other parts of the world, and like Scruff, exact locations are not provided in high-risk countries. Its director of equality, Jack Harrison-Quintana, told ABC News the company is working on giving users the ability to change the app's icon in case their phones are confiscated by the police, and is studying behavior associated with suspicious profiles.
"Our user community is really just our first line of defense against these things," Harrison-Quintana said. "Educating and empowering them makes a real difference."
Sean Howell, Hornet's president and co-founder, said he was so concerned that he flew to Cairo himself for a day last month to meet with users, activists and non-governmental organization workers -- some of whom were in hiding.
Howell told ABC News he was dismayed at how uninformed his app's users were despite the company's best efforts, and that generally, their behavior had not changed much in recent weeks.
But the answer, he said, was not encouraging them to give up online dating, particularly when meeting virtually may still be safer than frequenting coffee shops or bars popular with LGBT people.
"The consensus was that telling people not to use the app would be punitive to the community," Howell said. "Meeting online has just become such an important part of a gay person's evolution, especially for young people."
Tinder, a dating app that does not target just LGBT people but which Egyptians said was commonly used by them, did not respond to multiple requests for information about protections for its users in Egypt.
While security services have picked up their persecution of LGBT people in recent years, it was not always clear that the crackdown this fall would grow into what some believe is the worst wave yet.
When Mohamed, a 30-year-old gay man from Cairo, saw the rainbow flags raised at the Mashrou' Leila concert, he initially was happy.
Then, Egyptian media launched tirade after tirade against LGBT people. The intensity, Mohamed and other LGBT Egyptians said, was frightening.
Mohamed quickly deleted photos, text messages and gay dating apps from his phone, and started using an encrypted communications app.
"This crackdown terrified me because I saw them arresting people who had nothing to do with the concert," he said. "They arrested people randomly because the police know gay guys' meeting places."
Mohamed said he wants to flee Egypt and has friends who already have.
"I am not only afraid of the police," he said. "I am afraid of the people even more."
Meanwhile, scores of Egyptian legislators are lobbying for a law that would explicitly criminalize homosexual acts to ensure harsher penalties by replacing a 1961 anti-prostitution law that has been used against LGBT people for decades.
"Homosexuality" is not clearly defined or mentioned in Egyptian law, so authorities have been prosecuting LGBT people under charges of "habitual debauchery" that can send them to jail for up to three years.
More than 60 Egyptian members of parliament have backed a bill that for the first time would explicitly punish those who engage in "homosexual" acts or promote "homosexuality." The act would imprison violators for up to five years for individual offenses and up to 15 years if convicted under multiple provisions, according to Amnesty International.
"If passed, this law would further entrench stigma and abuse against people based on their perceived sexual orientation," Amnesty International's North Africa campaigns director, Najia Bounaim, said in a statement.
A gay man in Cairo who attended the Mashrou' Leila concert told ABC News he knew three people who were arrested. He said the crackdown has overwhelmed him, making him physically ill and leading him to stay away from the internet.
"I'm trying not to be paranoid and just trying to be very cautious," the man, in his mid-20s, said. "But yes, I'm afraid. I'm definitely afraid for my life. I haven't been seeing anyone who I don't know."
He said he felt like a political pawn and was not sure if he wanted to stay in Egypt.
"It's funny that people, at some point, think that they have a say on whether I have a right to exist or not," he said. "I know people who are miserably depressed now, after the amount of hate speech they were subjected to in the media."
While some of the dozens arrested in recent weeks have been released, the social stigma against LGBT people means defendants and their families can continue to face harassment, according to Dalia Abdel-Hameed, the head of the gender program at the Egyptian Initiative for Personal Rights.
Often, when LGBT people are arrested, they have not come out to their families, who sometimes reject them, Abdel-Hameed told ABC News.
After 26 men were detained during a round-up at a bathhouse in 2014 -- and were later acquitted -- one man tried to light himself on fire, she said, "because society doesn't forgive."
While not everyone is ready to give up their life in Egypt, some don't think they have a real choice.
In 2011, Egyptian Samer Habib, who is gay, moved to Canada to attend college. He returned home once the next year, eventually deciding it was not safe for him to live in his hometown of Cairo as he increasingly opened up about his sexual orientation.
Rather than go back again and likely face discrimination during his mandatory military service -- Egypt has conscription for young men -- Habib applied for asylum in Canada.
He received refugee status in May. Now 24 years old, he lives in Winnipeg, Canada, with a Canadian boyfriend and a job at the University of Winnipeg, but he misses his family -- and the country where he grew up.
"There really isn't a day that goes by where I don't wish I could go home and go visit everybody," Habib told ABC News. "But of course, there's no getting around the fact that the culture is embedded with homophobia, and there's nothing really I can do to change that."
Mohamed, a 22-year-old recent university graduate in Alexandria, is trying to escape. He hopes applying to universities in Germany -- but first learning German -- will put him on a path out of Egypt, where he said he now struggles to make friends because there is so much distrust in the LGBT community.
He still uses dating apps, he said, but exercises extreme caution. "I only chat with people who speak English, which I know sounds a bit elitist, but I'm trying to keep myself safe," he said.
Raising the rainbow flag did not turn Egyptians against LGBT people in itself, he said, but it exposed his countrymen's true beliefs.
"Really, the hate was always here," Mohamed said. "That part never changed. It's just more open now."
LGBT Egyptians described a feeling of being trapped and paranoid.
"I started avoiding gathering in any means with any of my LGBT friends, in any of their houses," a 33-year-old transgender man from Cairo said. "I actually went one time, and I had this feeling that, 'OK, police are going to come any minute now.'"
Transgender people in Egypt are generally viewed through a different lens than gay or bisexual people. Egypt has in recent years allowed treatment for gender dysphoria, although the social stigma can still be strong.
The transgender man from Cairo said he started presenting as a man about 10 months ago and planned to have gender reassignment surgery abroad this month. In the meantime, he has been using his brother's identity papers, as his show him as a woman.
"As long as you are living here in Egypt with a disguised identify," he said, "as long as people are seeing you as a normal man, they don't know your history, they don't know your case, you don't have any problem."
Ahmed, a gay man in his late 20s in Cairo, said that LGBT people had been living under heightened pressure ever since the military took over four years before. He said he was socially privileged and could be relatively open with his friends about his sexual orientation.
"I was always cautious," he said in an email. "Because the danger has been there for years and it is not just restricted to the police, there is also risks of thugs, violence and hate crime."
He said he had contemplated leaving the country because, no matter what, his life would "always be in the shadows" and that he was not sure if there was "anything left to fight for here."
"This wave was loud and was loud for a reason," he said, though observers can only speculate why.
"But it is vital to know that in terms of media frenzy and arrests, queers make an easy target," he added. "Very few care about us. Very few would be moved to stop this. Even less would stand up for us."