Imagine meeting someone on a gay dating app like Grindr or Scruff. You exchange small talk and sexy photos for a couple days before asking him on a date. He suggests a nearby, popular cafe, but when you arrive, police officers swoop in and arrest you. As it turns out, your beau was an undercover officer; you're told that you're being charged with "debauchery," and your conversations and photos will be used as evidence against you in trial. You could end up spending six months to six years in jail, where you may be subject to torture.

This isn't some Orwellian hypothetical; it's a serious reality for queer people in Egypt, and one that seems to be getting worse.

On September 22, a Lebanese rock band, Mashrou' Leila, played a concert in Cairo. Mashrou' Leila's lead singer is openly gay, and some fans waved pride rainbow flags in the crowd—a serious political act in a country like Egypt, with a long history of state-sponsored queer oppression. Photos of the flag-waving incident quickly spread on social media, triggering a public outcry. And in the days following, seven alleged LGBTQ people were arrested and charged with promoting sexual deviancy. Since then, human rights groups have said that more than 60 have been arrested, with some sentenced to years in prison.

Rupert Colville, a UN human rights spokesman, told the Washington Post that some have been entrapped by police using gay dating apps and chat rooms, part of a campaign of digital entrapment on the part of Egyptian authorities that's been ongoing since 2013, when President Abdel Fattah el-Sisi's government came into power. In response, the gay dating apps Grindr and Hornet are taking steps to help ensure their users' safety in countries where they may be unsafe. They're necessary steps to reclaim some of the few online spaces where queer people can meet in repressive societies.

A recent update to Grindr in Middle Eastern, Gulf and North African areas enables users to change the Grindr thumbnail on their phone into something less conspicuous, and set a passcode to open the app and protect the content inside. And the Egyptian crackdown has prompted Hornet and Grindr to send safety tips to users in Arabic, reminding them to take extra steps to confirm the identity of users they might meet from the app and tell others where they'll be beforehand. Sean Howell, Hornet's president, said the company is developing other solutions to ensure user safety, but declined to provide details to protect their confidentiality.

These recent updates are part of a broader effort across the gay dating app industry to help protect users. In 2014, in response to reports that Egyptian police were using the service to triangulate user locations, Grindr disabled a feature that showed one's distance from others on the app. And in 2015, Scruff introduced a slate of features to protect users, including sending travel advisories to users who enter countries where homosexuality is criminalized, automatically disabling location services in those countries, and the ability to flag profiles that users believe are being used to entrap others.

"We have a general set of safety recommendations that are available in ten languages," said Jack Harrison-Quintana, the director of Grindr For Equality, an arm of the company dedicated to LGBTQ activism. "Those are sent out every week to users in parts of the world where LGBTQ people may be in danger generally. However, during a time of particular crisis, we also send out warnings about whatever is going on at the moment on a more regular schedule. In this case, a message is going out every day and has been for several weeks since the concert. We're doing the same in a few other countries at the moment like Azerbaijan and Tajikistan."

"I think it's really clever and thoughtful to come up with ways for people to hide the [Grindr] icon," said Neela Ghoshal, a senior LGBT rights researcher with Human Rights Watch. She explained that Egyptian police have been known to stop people walking down the street who look effeminate or simply grab their attention; the move could protect people subject to random searches.

"They're looking for many things: They're looking for photos on your phone, they're looking at your text messages if they can open them and they're looking for something like Grindr," said Ghoshal. "So obviously there's a lot on people's phones that could potentially incriminate them."

Watch a VICE report on Chechnya's LGBT crisis:

Dalia Abd El-Hameed is a gender and human rights officer with the Egyptian Initiative for Personal Rights, an Egyptian human rights group**,** who helped develop a set of recommendations for Grindr to improve user safety in imperiled areas. He explained that in Egypt, defendants can be charged solely with electronic evidence like chat history.

Egypt is also known for performing invasive forensic anal exams on queer people who are detained to determine whether a victim is gay, despite there being no scientific basis to the method and it begin considered a form of torture by many. The results of these exams could be used as evidence when there isn't any other available.

In response to the ongoing crackdown, many queer Egyptians are deleting dating apps altogether and clearing out their social media accounts. Scott Long, an American human rights activist with extensive experience in LGBTQ rights in Egypt, emphasized that no dating app is able to completely prevent police entrapment.

"The apps are sufficiently unsafe that I really discourage people from using them, but at the same time I recognize that most people will probably still use them," Long said. "Chances for face-to-face contact have been cut down so much that they're so desperate to have some contact with the queer community or other queer people, and I think that overrides their need for safety at some point."

He said he was familiar with two underground LGBTQ groups in Egypt that conduct training sessions to help people use dating apps safely. They emphasize the precarious nature of online dating, encourage users not to exchange real names, and only meet people who have been vetted by friends or friends of friends. The recommendations echo push notifications Grindr and other apps have sent with similar tips for users.

For now, Egypt's crackdown seems ongoing; Ghoshal emphasized that international pressure could play a critical role in ending it. The US State Department has publicly expressed concern over the issue but has yet to release an official statement. Ghoshal said she was unaware of official condemnations by the EU, any EU countries, the UK, or Canada, either. The only official statement to emerge from any major world power thus far has come from the United Nations.

"If somebody is getting arrested because of using the application I shouldn't tell him, 'Stop using the application.' I should tell the police to stop the crackdown," Abd El-Hameed said. "And I should tell the people at the application, make this more secure."