Although homosexuality is technically not a crime, Cairo (and Egypt) is a conservative society and gay men can, and have been, prosecuted using debauchery and public morals laws with prison terms of up to 17 years. In late 2017, the Egyptian government launched a large crack-down on the LGBT community arresting 57 people in a series of raids. The situation for the local LGBT community in Cairo remains very tense.
For foreign gay travellers in Cairo, the situation may be nowhere near as depressing, but exercising common sense discretion and caution is advised. Solo male gay travellers should not use gay dating apps while here as the police are known to target app users. Gay or lesbian couples should avoid public displays of affection – the same rule applies for heterosexual couples – and it's advisable to steer clear of the very budget end of the accommodation market. Midrange and top-end hotels will usually have no problem with same-sex couples requesting a double bed. Be aware that although there is a small and very underground gay scene in Cairo; tapping into it as a visiting foreigner can be difficult and risky.