LGBTQ people and Islam

Within the Muslim world, sentiment towards LGBTQ people varies and has varied between societies and individual Muslims. While colloquial and de facto official acceptance of at least some homosexual and gender variant behaviors were commonplace in pre-modern periods, later developments, starting from the 19th century, have created a predominantly hostile environment for LGBTQ people.

There are differences in how the Quran and later hadith traditions (orally transmitted collections of Muhammad's teachings) treat homosexuality, with the latter being far more explicitly negative. This has caused rifts in legalistic opinion, as while all major schools of jurisprudence broadly agreed that liwatanal sex between men—was haram, opinions varied in terms of the legality and severity of punishment, as well as the legal situation of women's same-sex relations. Furthermore, these formulations largely remained theoretical, as historical evidence from the pre-modern period shows de facto tolerance of homosexual relationships. Historical records also suggest that in the event that laws against homosexuality were invoked in the pre-modern period, they were done so mainly in cases of rape or other "exceptionally blatant infringement on public morals". These factors allowed themes of homoeroticism and pederasty to be cultivated in Islamic poetry and other Islamic literary genres from the 8th century CE into the modern era. The conceptions of homosexuality found in these texts resembled the traditions of ancient Greece and ancient Rome as opposed to the modern understanding of sexual orientation.

In the modern era, Muslim public attitudes towards homosexuality underwent a marked change beginning in the 19th century, largely due to the global spread of Islamic fundamentalist movements, namely Salafism and Wahhabism. The Muslim world was also influenced by the sexual notions and norms that were prevalent in the Christian world at the time, particularly with regard to anti-LGBTQ legislation prevalent throughout European societies; a number of Muslim-majority countries that were once colonies of European empires retain colonial criminal penalties against homosexuality.

As Western culture eventually enabled a platform for the flourishing of many LGBTQ movements, many Muslim fundamentalists came to associate the Western world with "ravaging moral decay" and rampant homosexuality. In contemporary society, prejudice, anti-LGBTQ discrimination and anti-LGBTQ violence—including violence which is practiced within legal systems—persist in much of the Muslim world, exacerbated by socially conservative attitudes and the rise of Islamist ideologies in some countries. There are laws in place against homosexual activities in many Muslim-majority countries, with a number of them prescribing the death penalty for convicted offenders. In surveys of public opinion, the vast majority of Muslims across various countries reject the notion that homosexuality should be acceptable in society. Most Muslim-majority countries have opposed moves to advance LGBTQ rights and recognition at the United Nations (UN), including within the UN General Assembly and the UN Human Rights Council.

Despite these developments, contemporary Islamic jurisprudence generally accepts the possibility for transgender people (mukhannith/mutarajjilah) to change their gender status, but only after surgery, linking one's gender to biological markers. Trans people are nonetheless confronted with stigma, discrimination, intimidation, and harassment in many ways in Muslim-majority societies. Transgender identities are often considered under the gender binary, although some pre-modern scholars had recognized effeminate men (mukhannath) as a form of third gender, as long as their behaviour was natural and not a performance.