Lesbian, gay, bisexual, transgender, and queer (LGBTQ) people in Egypt face severe challenges not experienced by non-LGBTQ residents. There are reports of widespread discrimination and violence towards openly LGBTQ people within Egypt, with police frequently prosecuting gay and transgender individuals.

Contemporary Egyptian law does not explicitly criminalize same-sex sexual acts. Instead, the state used several morality provisions for the de facto criminalization of homosexual conduct. Any behavior, or the expression of any idea that is deemed to be immoral, scandalous or offensive to the teachings of a recognized religious leader, may be prosecuted using these provisions. These public morality and public order laws have been used to target the LGBTQ community.

History of homosexuality and legality of same-sex sexual activity History of homosexuality in ancient Egypt

According to common interpretations of the Torah, Leviticus 18:3 alludes to the practice that ancient Egypt permitted two women or two men to marry each other. The best-known case of possible homosexuality in ancient Egypt is that of the two high officials Nyankh-Khnum and Khnum-hotep. Both men lived and served under pharaoh Niuserre during the 5th Dynasty (c. 2494–2345 BC).Richard Parkinson: Homosexual Desire and Middle Kingdom Literature. In: The Journal of Egyptian Archaeology (JEA), vol. 81, 1995, pp. 57–76. Nyankh-Khnum and Khnum-hotep each had families of their own with children and wives, but when they died their families apparently decided to bury them together in one and the same mastaba tomb. In this mastaba, several paintings depict both men embracing each other and touching their faces nose-on-nose. These depictions leave plenty of room for speculation, because in ancient Egypt the nose-on-nose touching normally represented a kiss.

Egyptologists and historians disagree about how to interpret the paintings of Nyankh-khnum and Khnum-hotep. Some scholars believe that the paintings reflect an example of homosexuality between two married men and prove that the ancient Egyptians accepted same-sex relationships. Other scholars disagree and interpret the scenes as an evidence that Nyankh-khnum and Khnum-hotep were twins, even possibly conjoined twins. No matter what interpretation is correct, the paintings show at the very least that Nyankh-khnum and Khnum-hotep must have been very close to each other in life as in death.

It remains unclear, what exact view the ancient Egyptians fostered about homosexuality. Any document and literature that actually contains sexual orientated stories, never name the nature of the sexual deeds, but instead uses stilted and flowery paraphrases. While the stories about Seth and his sexual behavior may reveal rather negative thoughts and views, the tomb inscription of Nyankh-khnum and Khnum-hotep may instead suggest that homosexuality was likewise accepted. Ancient Egyptian documents never clearly say that same-sex relationships were seen as reprehensible or despicable. No ancient Egyptian document mentions that homosexual acts were set under penalty. Thus it was very likely tolerated, as there has never been proof suggesting otherwise.Emma Brunner-Traut: Altägyptische Märchen. Mythen und andere volkstümliche Erzählungen. 10th Edition. Diederichs, Munich 1991, , pp. 178–179.

The Roman Emperor Constantine in the 4th century AD is said to have exterminated a large number of "effeminate priests" based in Alexandria.Anthony Appiah and Henry Louis Gates, Encyclopedia of Africa, Volume 2 OUP, USA, 2010

Coptic Egypt The 6th- or 7th-century Ashmolean Parchment AN 1981.940 provides the only example in Coptic language of a love spell between men. This vellum leaf contains an incantation by a man named Apapolo, the son of Noah, to compel the presence and love of another man Phello, the son of Maure. Phello will be restless until he finds Apapolo and satisfies the latter's desire.

Medieval Islamic Egypt Sunni Islam eventually supplanted Christianity as the dominant religion of Egypt in the centuries following the Muslim conquest of Egypt. Alongside Sunni Islam came a new ruling class: the Arabs, and later, the Mamluks. The cultural dialogue on homosocial and homosexual behaviors in medieval Egypt was usually critical. The native Egyptian population was tolerant of homosexual behaviors, and discussion of the matter was usually spearheaded by legalistic Islamic scholars from the Muslim ruling class. The Western concept of a homosexual, as presently understood, did not exist in medieval Egypt. Words describing homosexual-adjacent acts/behaviors described actions, and not a group of people. Furthermore, there is a lack of historically recorded evidence on homosexuality in Egypt until the 8th century: this marks the entrance of boy-love poetry into the historical record.

The existence of homosexual behaviors in the interim period shortly after the Muslim conquest is not in doubt, however. Medieval Egyptian society, though a Muslim society, did not by default share the same outlook on masculinity, homosexuality, and homoerotic behavior as other lands conquered by the Rashidun Caliphate, especially where Islam's influence was weaker. The cultural norms of homosexuality in medieval Egypt were in line with those of the Eastern Mediterranean; top-down societal pressure from Islam did cause these behaviors to be scrutinized more heavily than they were before, especially by religious officials. Coptic Christianity's interaction with Islam fostered a large Sufi mystic population, that, in turn, had its own cultural views on homoerotic behaviors, in the form of "gazing" at young men who were seen as earthly representations of the beauty of God. Sufi practices were attacked by religious conservatives and viewed as hotbeds of degeneracy.

Volney, a Frenchman who traveled through Egypt in the eighteenth century the later said of Egypt's ruling caste, the Mamluks: "They are, above all, addicted to that abominable wickedness which was at all times the vice of the Greeks ... It is difficult to account for this taste, when we consider that they all have women, unless we suppose they seek in one sex that poignancy of refusal which they do not permit the other." The practice described by Volney as "the vice of the Greeks" is known as pederasty, and this was a visible and tolerated expression of homosexual behaviors in both medieval Egypt and the historical Eastern Mediterranean. The introduction of Islam into the fold did not adversely impact this practice in the general public. In the Egyptian context, it was considered natural for older men to gaze upon younger men seen as desirable and beautiful, with some consideration given to their age, though not always. This attraction to male youth was viewed as natural and compatible with traditional Muslim gender roles; in that regard, pederasty was as natural as heterosexuality. Arab and Turkish poems dedicated to various beautiful young men began to appear in the 8th century in various Muslim countries, including medieval Egypt. The presence of homoerotic literature demonstrates the tolerance of certain same-sex behaviors in Arab and Muslim societies at large, with some cultural differences depending on the country in question. The prevalence of homoerotic behaviors in medieval Egyptian society as they pertain to men who already had wives was a topic of rigorous debate among religious authorities, though it was culturally tolerable in medieval Egypt. Islamic law on the matter of same-sex sexual activity was further expanded after the explosion of homoerotic narratives across the Muslim world in the 8th century. Medieval Egyptian society was tolerant of homosocial, homoerotic, and homosexual behaviors and acts; religious authorities were not. Islamic law tolerated a smaller subsection of behaviors (pederasty), for a time, and described certain acts as deeply dangerous to society and repugnant to the faith. Islam was discouraging of homosexual behaviors and non traditional gender roles, while native Egyptian cultural practices were tolerant of a larger array of homosexual behaviors, acts, and attractions. As such, it is best to consider the intersection of culture and religion at various moments in medieval Egyptian history when discussing the status of, by Western standards, LGBTQ individuals in medieval Egyptian society.

19th and mid-20th centuries

During the 19th century, homosocial and homosexual relations were generally seen as normal in Egyptian society. One notable expression of gender nonconformity came in the form of the khawalat; male cross-dressing dancers who performed in public celebrations. It was typical for khawalat to take the place of female dancers. The kwahal were seen as acceptable substitutes for dancing women, who were restricted at the time due to concerns over men's health. In modern day, the term khawalat has been stigmatized and used as a derogatory term for passive and gay men.Long, Scott. "In a Time of Torture: The Assault on Justice in Egypt's Crackdown on Homosexual Conduct." New York: Human Rights Watch, 2004. Accessed November 2, 2020.

French novelist Gustave Flaubert wrote a letter to a friend in 1850 in which Flaubert wrote how he was shocked by the overall normality and acceptance of homosexuality in Egypt; noting that the subject was freely admitted and discussed in public. The same was true in 1931 according to writer Faraj Fakhri, who stated:"There is no need to mention any details on homosexuality in these places, since a reader who knows even a little of sexual life in ‘the city’ would understand very well what I am talking about."Activist Scott Long notes that "Egypt's criminalization of consensual, non-commercial sex between men arose partly out of, and partly in reaction to, the colonial regulation of female sex work." In 1883, Khedive Tewfik introduced a legal code in Egypt, which had been occupied by the British a year earlier. The code was modelled after the Napoleonic Code, the civil code introduced by Napoleon Bonaparte in France in 1804, and in part regulated the condition of female prostitutes in Egypt by requiring them to be subject to regular medical examinations, which remained in force until 1949. Political resistance in Egypt to the occupation soon targeted the Egyptian prostitution system, due to the solicitation of prostitutes by British troops and the "privileged status enjoyed by foreign prostitutes over Egyptians", which contributed to "prostitution's association with political subjugation." As noted by Long,

In 1949 a special committee of the House of Representatives (then the lower house of parliament) began studying the draft of the first anti-prostitution law in Egypt. The committee's report recommended introducing the term fujur [debauchery] as a criminalized conduct. It urged adding the word "so the text [can] include male prostitution, since the word di`ara [prostitution] only referred to female prostitution."

An extension to the law in 1951 defined prostitution as "the practice of vice with others with no distinction." As Long notes, "In the absence of the monetary element, the definition in effect criminalized consensual "promiscuity" in general, rendering exchange of money for sex irrelevant."