LGBT dalam Islam

Para utusan kepada Lot

Al-Quran mengandungi beberapa kiasan untuk kegiatan homoseksual, yang telah menyebabkan banyak exegetical dan komentar undang-undang selama berabad-abad. Subjek paling jelas ditangani dalam kisah Sodom dan Gomorrah (tujuh ayat) selepas penduduk bandar meminta akses seksual kepada utusan yang dihantar oleh Allah kepada Nabi Lut a.s. The Quranic narrative largely conforms to that found in Genesis. Dalam satu ayat Al-Quran mengatakan bahawa lelaki itu "meminta para tamunya kepadanya" (Al-Quran 54:37), dengan menggunakan ungkapan yang sama dengan ayat-ayat yang digunakan untuk menggambarkan [Potiphar dan isterinya | [Joseph in Islam | Joseph]], dan dalam banyak ayat mereka dituduh "datang dengan nafsu" kepada lelaki bukan  wanita (atau isteri mereka). Istilah al-Quran ini adalah satu kekejian (Bahasa Arab: فاحشة‎, translit. fāḥiša) tidak pernah berlaku dalam sejarah dunia:
"Dan (Kami utuskan) Lot ketika dia berkata kepada kaumnya: Apa! adakah kamu melakukan perbuatan yang tidak senonoh yang mana pun di dunia tidak pernah dilakukan sebelum kamu? Sesungguhnya kamu datang kepada lelaki dengan nafsu selain perempuan; Sebaliknya awak adalah orang yang mewah. Dan jawab kaumnya adalah tidak lain dari yang mereka katakan: Peganglah mereka dari bandarmu, sesungguhnya mereka adalah kaum yang berusaha membersihkan diri. Maka Kami selamatkan dia dan pengikut-pengikutnya, kecuali isterinya; dia adalah orang-orang yang tinggal di belakang. Dan Kami turunkan hujan kepada mereka; pertimbangkanlah apa yang menjadi penghujung orang yang bersalah."
Kemudian kesusasteraan eksegetikal dibina di atas ayat-ayat ini sebagai penulis cuba memberi pandangan sendiri tentang apa yang berlaku; dan ada persetujuan umum di kalangan para exegetes bahawa "kekejian" yang disinggung oleh ayat-ayat Al-Quran telah cuba sodomi (khususnya hubungan dubur) antara lelaki. Sesetengah aktivis Muslim gay dan lesbian moden tidak bersetuju dengan tafsiran ini, dengan alasan bahawa rakyat Lot dimusnahkan bukan kerana penyertaan dalam perbuatan seks yang sama, tetapi kerana salah laku yang termasuk menolak untuk menyembah Tuhan, mengabaikan kuasa para nabi, dan cuba merogol pengembara, jenayah yang dibuat lebih teruk oleh fakta bahawa pengembara berada di bawah perlindungan dan keramahan Lot.
The sins of the people of Lut (Bahasa Arab: لوط‎) subsequently became proverbial, and the Arabic words for the act of anal sex between men (Bahasa Arab: لواط‎, translit. liwāṭ) and for a person who performs such acts (Bahasa Arab: لوطي‎, translit. lūṭi) ironically both derive from his name (even though Lut wasn't the one demanding sex).

Zina verse

Only one passage in the Quran prescribes a strictly legal position. It is not restricted to homosexual behaviour, however, and deals more generally with zina (illicit sexual intercourse):
"And as for those who are guilty of an indecency from among your women, call to witnesses against them four (witnesses) from among you; then if they bear witness confine them to the houses until death takes them away or Allah opens some way for them (15). And as for the two who are guilty of indecency from among you, give them both a punishment; then if they repent and amend, turn aside from them; surely Allah is oft-returning (to mercy), the Merciful. (16)"
Most exegetes hold that these verses refer to illicit heterosexual relationships, although a minority view attributed to the Mu'tazilite scholar Abu Muslim al-Isfahani interpreted them as referring to homosexual relations. This view was widely rejected by medieval scholars, but has found some acceptance in modern times.

Cupbearers in paradise

Some Quranic verses describing the paradise refer to "immortal boys" (56:17, 76:19) or "young men" (52:24) who serve wine to the blessed. Although the tafsir literature does not interpret this as a homoerotic allusion, the connection was made in other literary genres, mostly humorously. For example, the Abbasid-era poet Abu Nuwas wrote:
A beautiful lad came carrying the wine 

With smooth hands and fingers dyed with henna 

And with long hair of golden curls around his cheeks ... 

I have a lad who is like the beautiful lads of paradise 

And his eyes are big and beautiful
Jurists of the Hanafi school took up the question seriously, considering, but ultimately rejecting the suggestion that homosexual pleasures were, like wine, forbidden in this world but enjoyed in the afterlife.

In hadith and athar

The hadith (sayings and actions attributed to Muhammad) show that homosexual behaviour was not unknown in seventh-century Arabia. However, given that the Quran did not specify the punishment of homosexual sodomy, Islamic jurists increasingly turned to several "more explicit but poorly attested" hadiths in an attempt to find guidance on appropriate punishment.
While there are no reports relating to homosexuality in the best known hadith collections of Bukhari and Muslim, other canonical collections record a number of condemnations of the "act of the people of Lot" (male-to-male anal intercourse). For example, Abu `Isa Muhammad ibn `Isa at-Tirmidhi (compiling the Sunan al-Tirmidhi around C.E.884) wrote that Muhammad had indeed prescribed the death penalty for both the active and also the passive partner:
 Narrated by Abdullah ibn Abbas: The Prophet said: If you find anyone doing as Lot's people did, kill the one who does it, and the one to whom it is done.
 – Sunan Abu Daud, 38:4447, Al-Tirmidhi, 15:1456, Ibn Maajah, 20:2561
Narrated Abdullah ibn Abbas: If a man who is not married is seized committing sodomy he will be stoned to death.
—Sunan Abu Daud, 38:4448
Ibn al-Jawzi (1114–1200) writing in the 12th century claimed that Muhammad had cursed "sodomites" in several hadith, and had recommended the death penalty for both the active and passive partners in homosexual acts.
It was narrated that Ibn 'Abbaas said: "The Prophet said: "... cursed is the one who does the action of the people of Lot."
—Musnad Ahmad:1878
Ahmad narrated from Ibn 'Abbas that the Prophet of Allah said: "May Allah curse the one who does the action of the people of Lot, may Allah curse the one who does the action of the people of Lot," three times.
—Musnad Ahmad: 2915
Al-Nuwayri (1272–1332) in his Nihaya reports that Muhammad is "alleged to have said what he feared most for his community were the practices of the people of Lot (although he seems to have expressed the same idea in regard to wine and female seduction)."
It was narrated that Jabir: "The Prophet said: 'There is nothing I fear for my followers more than the deed of the people of Lot.'"
—Al-Tirmidhi: 1457, Ibn Maajah: 2563
Other hadiths seem to permit homoerotic feelings as long as they are not translated into action. One hadith acknowledges homoerotic temptation and warns against it: "Do not gaze at the beardless youths, for verily they have eyes more tempting than the houris" or "... for verily they resemble the houris". These beardless youths are also described as wearing sumptuous robes and having perfumed hair.
In addition, there is a number of "purported (but mutually inconsistent) reports" (athar) of punishments of sodomy ordered by early caliphs. Abu Bakr apparently recommended toppling a wall on the culprit, or else burning him alive, while Ali bin Abi Talib is said to have ordered death by stoning for one sodomite and had another thrown head-first from the top of a minaret—according to Ibn Abbas, the latter punishment must be followed by stoning.
There are, however, fewer hadith mentioning homosexual behavior in women;
but punishment (if any) for lesbianism was not clarified.
The hadith collection of Bukhari (compiled in the 9th century from earlier oral traditions) includes a report regarding mukhannathun, effeminate men who were granted access to secluded women's quarters and engaged in other non-normative gender behavior:
 Narrated by Abdullah ibn Abbas: The Prophet cursed effeminate men; those men who are in the similitude (assume the manners of women) and those women who assume the manners of men, and he said, "Turn them out of your houses." The Prophet turned out such-and-such man, and 'Umar turned out such-and-such woman.
 – Sahih Bukhari, 7:72:774
In hadiths attributed to Muhammad's wives, a mukhannath in question expressed his appreciation of a woman's body and described it for the benefit of another man. According to Everett Rowson, none of the sources state that Muhammad banished more than two mukhannathun, and it is not clear to what extent the action was taken because of their breaking of gender rules in itself or because of the "perceived damage to social institutions from their activities as matchmakers and their corresponding access to women".

Traditional Islamic law

According to traditional Islamic law, homosexual activity cannot occur in a legal manner because it takes place outside marriage and between partners of the same sex.
The paucity of concrete prescriptions to be derived from hadith and the contradictory nature of information about the actions of early authorities resulted in lack of agreement among classical jurists as to how homosexual activity should be treated. Most legal schools treat homosexual intercourse with penetration similarly to unlawful heterosexual intercourse under the rubric of zina, but there are differences of opinion with respect to methods of punishment. Some legal schools "prescribed capital punishment for sodomy, but others opted only for a relatively mild discretionary punishment." The Hanbalites are the most severe among Sunni schools, insisting on capital punishment for anal sex in all cases, while the other schools generally restrict punishment to flagellation with or without banishment, unless the culprit is muhsan (Muslim free married adult), and Hanafis often suggest no physical punishment at all, leaving the choice to the judge's discretion. The founder of the Hanafi school Abu Hanifa refused to recognize the analogy between sodomy and zina, although his two principal students disagreed with him on this point. The Hanafi scholar Abu Bakr Al-Jassas (d. 981 AD/370 AH) argued that the two hadiths on killing homosexuals "are not reliable by any means and no legal punishment can be prescribed based on them". Where capital punishment is prescribed and a particular method is recommended, the methods range from stoning (Hanbali, Maliki), to the sword (some Hanbalites and Shafi'ites), or leaving it to the court to choose between several methods, including throwing the culprit off a high building (Shi'ite).
For unclear reasons, the treatment of homosexuality in Twelver Shia jurisprudence is generally harsher than in Sunni fiqh, while Zaydi and Isma'ili Shia jurists took positions similar to the Sunnis. Where flogging is prescribed, there is a tendency for indulgence and some recommend that the prescribed penalty should not be applied in full, with Ibn Hazm reducing the number of strokes to 10. There was debate as to whether the active and passive partners in anal sex should be punished equally. Beyond penetrative anal sex, there was "general agreement" that "other homosexual acts (including any between females) were lesser offenses, subject only to discretionary punishment." Some jurists viewed sexual intercourse as possible only for an individual who possesses a phallus; hence those definitions of sexual intercourse that rely on the entry of as little of the corona of the phallus into a partner's orifice. Since women do not possess a phallus and cannot have intercourse with one another, they are, in this interpretation, physically incapable of committing zinā.
Since a hadd punishment for zina requires testimony from four witnesses to the actual act of penetration or a confession from the accused repeated four times, the legal criteria for the prescribed harsh punishments of homosexual acts were very difficult to fulfill. The debates of classical jurists are "to a large extent theoretical, since homosexual relations have always been tolerated" in pre-modern Islamic societies. While it is difficult to ascertain to what extent the legal sanctions were enforced in different times and places, historical record suggests that the laws were invoked mainly in cases of rape or other "exceptionally blatant infringement on public morals". Documented instances of prosecution for homosexual acts are rare, and those which followed legal procedure prescribed by Islamic law are even rarer.

Modernist interpretations of scripture and sharia

In her 2016 book, Kecia Ali observes that "contemporary scholars disagree sharply about the Qur'anic perspective on same-sex intimacy." One scholar represents the conventional perspective by arguing that the Qur'an "is very explicit in its condemnation of homosexuality leaving scarcely any loophole for a theological accommodation of homosexuality in Islam." Another scholar argues that "the Qur'an does not address homosexuality or homosexuals explicitly." Overall, Ali says that "there is no one Muslim perspective on anything."
Many Muslim scholars have followed a "don't ask, don't tell" policy in regards to homosexuality in Islam, by treating the subject with passivity. 
Mohamed El-Moctar El-Shinqiti, director of the Islamic Center of South Plains in Texas, has argued that "[even though] homosexuality is a grievous sin...[a] no legal punishment is stated in the Qur'an for homosexuality...[b] it is not reported that Prophet Muhammad has punished somebody for committing homosexuality...[c] there is no authentic hadith reported from the Prophet prescribing a punishment for the homosexuals..." Classical hadith scholars such as Al-Bukhari, Yahya ibn Ma'in, Al-Nasa'i, Ibn Hazm, Al-Tirmidhi, and others have impugned the authenticity of hadith reporting these statements.
Egyptian Islamist journalist Muhammad Jalal Kishk also found no punishment for homosexual acts prescribed in the Quran, regarding the hadith that mentioned it as poorly attested. He did not approve of such acts, but believed that Muslims who abstained from sodomy would be rewarded by sex with youthful boys in paradise.  
Faisal Kutty, a professor of Islamic law at Indiana-based Valparaiso University Law School and Toronto-based Osgoode Hall Law School, commented on the contemporary same-sex marriage debate in a March 27, 2014, essay in the Huffington Post.  He acknowledged that while Islamic law iterations prohibits pre- and extra-marital as well as same-sex sexual activity, it does not attempt to "regulate feelings, emotions and urges, but only its translation into action that authorities had declared unlawful". Kutty, who teaches comparative law and legal reasoning, also wrote that many Islamic scholars have "even argued that homosexual tendencies themselves were not haram [prohibited] but had to be suppressed for the public good".  He claimed that this may not be "what the LGBTQ community wants to hear", but that, "it reveals that even classical Islamic jurists struggled with this issue and had a more sophisticated attitude than many contemporary Muslims". Kutty, who in the past wrote in support of allowing Islamic principles in dispute resolution, also noted that "most Muslims have no problem extending full human rights to those—even Muslims—who live together 'in sin'".  He argued that it therefore seems hypocritical to deny fundamental rights to same-sex couples. Moreover, he concurred with Islamic legal scholar Mohamed Fadel in arguing that this is not about changing Islamic marriage (nikah), but about making "sure that all citizens have access to the same kinds of public benefits".
Some modern day Muslim scholars, such as Scott Siraj al-Haqq Kugle, argue for a different interpretation of the Lot narrative focusing not on the sexual act but on the infidelity of the tribe and their rejection of Lot's Prophethood. According to Kugle, "where the Qur'an treats same-sex acts, it condemns them only so far as they are exploitive or violent." More generally, Kugle notes that the Quran refers to four different levels of personality. One level is "genetic inheritance." The Qur'an refers to this level as one's "physical stamp" that "determines one's temperamental nature" including one's sexuality. One the basis of this reading of the Qur'an, Kugle asserts that homosexuality is "caused by divine will," so "homosexuals have no rational choice in their internal disposition to be attracted to same-sex mates."  Kugle argues that if the classical commentators had seen "sexual orientation as an integral aspect of human personality," they would have read the narrative of Lot and his tribe "as addressing male rape of men in particular" and not as "addressing homosexuality in general."  Kugle furthermore reads the Qur'an as holding "a positive assessment of diversity." Under this reading, Islam can be described as "a religion that positively assesses diversity in creation and in human societies," allowing gay and lesbian Muslims to view homosexuality as representing the "natural diversity in sexuality in human societies." A critique of Kugle's approach, interpretations and conclusions was published in 2016 by Mobeen Vaid.
In a 2012 book, Aisha Geissinger writes that there are "apparently irreconcilable Muslim standpoints on same-sex desires and acts," all of which claim "interpretative authenticity." One of these standpoints results from "queer-friendly" interpretations of the Lot story and the Quran. The Lot story is interpreted as condemning "rape and inhospitality rather than today's consensual same-sex relationships."
In their book Islamic Law and Muslim Same-Sex Unions, Junaid Jahangir and Hussein Abdullatif argue that interpretations which view the Quranic narrative of the people of Lot and the derived classical notion of liwat as applying to same-sex relationships reflect the sociocultural norms and medical knowledge of socities that produced those interpretations. They further argue that the notion of liwat is compatible with the Quranic narrative, but not with the contemporary understanding of same-sex relationships based on love and shared responsibilities.
Abdessamad Dialmy in his 2010 article, "Sexuality and Islam," addressed "sexual norms defined by the sacred texts (Koran and Sunna)." He wrote that "sexual standards in Islam are paradoxical." The sacred texts "allow and actually are an enticement to the exercise of sexuality."  However, they also "discriminate . . . between heterosexuality and homosexuality." Islam's paradoxical standards result in "the current back and forth swing of sexual practices between repression and openness." Dialmy sees a solution to this back and forth swing by a "reinterpretation of repressive holy texts."

History of homosexuality in Islamic societies

Societies in Islam have recognized "both erotic attraction and sexual behavior between members of the same sex." However, their attitudes about them have often been contradictory: "severe religious and legal sanctions" against homosexual behavior and at the same time "celebratory expressions" of erotic attraction. Homoeroticism was idealized in the form of poetry or artistic declarations of love from one man to another. Accordingly, the Arabic language had an appreciable vocabulary of homoerotic terms, with a dozens of word just to describe types of male prostitutes. Schmitt (1992) identifies some twenty words in Arabic, Persian and Turkish to identify those who are penetrated. Other related Arabic words includes Mukhannathun, ma'bûn, halaqī, baghghā.

Pre-modern era

There is little evidence of homosexual practice in Islamic societies for the first century and a half of the Islamic era. Homoerotic poetry appears suddenly at the end of the 8th century CE, particularly in Baghdad in the work of Abu Nuwas (756-814), who became a master of all the contemporary genres of Arabic poetry. The famous author Jahiz tried to explain the abrupt change in attitudes toward homosexuality after the Abbasid Revolution by the arrival of the Abbasid army from Khurasan, who are said to have consoled themselves with male pages when they were forbidden to take their wives with them. The increased prosperity following the early conquests was accompanied by a "corruption of morals" in the two holy cities of Mecca and Medina, and it can be inferred that homosexual practice became more widespread during this time as a result of acculturation to foreign customs, such as the music and dance practiced by mukhannathun, who were mostly foreign in origin. The Abbasid ruler Al-Amin (809-813) was said to have required slave women to be dressed in masculine clothing so he could be persuaded to have sex with them, and a broader fashion for ghulamiyyat (boy-like girls) is reflected in literature of the period.
The conceptions of homosexuality found in classical Islamic texts resemble the traditions of classical Greece and those of ancient Rome, rather than modern Western notions of sexual orientation. It was expected that many or most mature men would be sexually attracted to both women and adolescent boys (with different views about the appropriate age range for the latter), and men were expected to wish to play only an active role in homosexual intercourse once they reached adulthood. Preference for homosexual over heterosexual relations was regarded as a matter of personal taste rather than a marker of homosexual identity in a modern sense. While playing an active role in homosexual relations carried no social stigma beyond that of licentious behavior, seeking to play a passive role was considered both unnatural and shameful for a mature man. Following Greek precedents, the Islamic medical tradition regarded as pathological only this latter case, and showed no concern for other forms of homosexual behavior.
During the early period, growth of a beard was considered to be the conventional age when an adolescent lost his homoerotic appeal, as evidenced by poetic protestations that the author still found his lover beautiful despite the growing beard. During later periods, the age of the stereotypical beloved became more ambiguous, and this prototype was often represented in Persian poetry by Turkish soldiers. This trend is illustrated by the story of Mahmud of Ghazni (971–1030), the ruler of the Ghaznavid Empire, and his cupbearer Malik Ayaz. Their relationship, which was sketchily attested in contemporary sources, became a staple of Persian literature comparable to the story of Layla and Majnun. Poets used it to illustrate the power of love, pointing to Mahmud as an example of a man who becomes "a slave to his slave", while Malik Ayaz served as "the embodiment of the ideal beloved, and a model for purity in Sufi literature".
Other famous examples of homosexuality include the Aghlabid Emir Ibrahim II of Ifriqiya (ruled 875–902), who was said to have been surrounded by some sixty catamites, yet whom he was said to have treated in a most horrific manner. Caliph al-Mutasim in the 9th century and some of his successors were accused of homosexuality. The popular stories say that Cordoba, Abd al-Rahman III had executed a young man from León who was held as a hostage, because he had refused his advances during the Reconquista.
The 14th century Iranian poet Obeid Zakani, in his scores of satirical stories and poems, has ridiculed the contradiction between the strict prohibitions of homosexuality on the one hand and its common practice on the other. Following is just an example from his Ressaleh Delgosha:“Two old men, who used to exchange sex since their very childhood, were making love on the top of a mosque’s minaret in the holy city of Qom. When both finished their turns, one told the other: “shameless practices have ruined our city.” The other man nodded and said, “You and I are the city’s blessed seniors, what then do you expect from others?” 
Mehmed the Conqueror, the Ottoman sultan living in the 15th century, European sources say "who was known to have ambivalent sexual tastes, sent a eunuch to the house of Notaras, demanding that he supply his good-looking fourteen-year-old son for the Sultan's pleasure. When he refused, the Sultan instantly ordered the decapitation of Notaras, together with that of his son and his son-in-law; and their three heads … were placed on the banqueting table before him". Another youth Mehmed found attractive, and who was presumably more accommodating, was Radu III the Fair, the brother of the famous Vlad the Impaler, "Radu, a hostage in Istanbul whose good looks had caught the Sultan's fancy, and who was thus singled out to serve as one of his most favored pages." After the defeat of Vlad, Mehmed placed Radu on the throne of Wallachia as a vassal ruler. However, Turkish sources deny these stories.
According to the Encyclopedia of Islam and the Muslim World:
Whatever the legal strictures on sexual activity, the positive expression of male homeoerotic sentiment in literature was accepted, and assiduously cultivated, from the late eighth century until modern times. First in Arabic, but later also in Persian, Turkish and Urdu, love poetry by men about boys more than competed with that about women, it overwhelmed it. Anecdotal literature reinforces this impression of general societal acceptance of the public celebration of male-male love (which hostile Western caricatures of Islamic societies in medieval and early modern times simply exaggerate).
European travellers remarked on the taste that Shah Abbas of Iran (1588-1629) had for wine and festivities, but also for attractive pages and cup-bearers. A painting by Riza Abbasi with homo-erotic qualities shows the ruler enjoying such delights.
"Homosexuality was a key symbolic issue throughout the Middle Ages in [Islamic] Iberia. As was customary everywhere until the nineteenth century, homosexuality was not viewed as a congenital disposition or 'identity'; the focus was on nonprocreative sexual practices, of which sodomy was the most controversial." For example, in "al-Andalus homosexual pleasures were much indulged by the intellectual and political elite. Evidence includes the behavior of rulers . . . who kept male harems." Although early islamic writings such as the Quran expressed a mildly negative attitude towards homosexuality, laypersons usually apprehended the idea with indifference, if not admiration. Few literary works displayed hostility towards non-heterosexuality, apart from partisan statements and debates about types of love (which also occurred in heterosexual contexts). Khaled el-Rouayheb (2014) maintain that "much if not most of the extant love poetry of the period [16th to 18th century] is pederastic in tone, portraying an adult male poet's passionate love for a teenage boy".
El-Rouayheb suggest that even though religious scholars considered sodomy as an abhorrent sin, most of them did not genuinely believe that it was illicit to merely fall in love with a boy or expressing this love via poetry. In the secular society however, a male's desire to penetrate a desirable youth was seen as understandable, even if not lawful. On the other hand, men adopting the passive role were more subjected to stigma. The medical term ubnah qualified the pathological desire of a male to exclusively be on the receiving end of anal intercourse. Physician that theorized on ubnah includes Rhazes, who thought that it was correlated with small genitals and that a treatment was possible provided that the subject was deemed to be not too effeminate and the behavior not "prolonged". Dawud al-Antaki advanced that it could have been caused by an acidic substance embedded in the veins of the anus, causing itchiness and thus the need to seek relief.
In mystic writings of the medieval era, such as Sufi texts, it is "unclear whether the beloved being addressed is a teenage boy or God." European chroniclers censured "the indulgent attitudes to gay sex in the Caliphs' courts."

Modern era

The attitudes toward homosexuality in the Ottoman empire underwent a dramatic change during the 19th century. Before that time, Ottoman societal norms accepted homoerotic relations as normal, despite condemnation of homosexuality by religious scholars. The Ottoman Sultanic law (qanun) tended to equalize the treatment of hetero- and homosexuals. Dream interpretation literature accepted homosexuality as natural, and karagoz, the principal character of popular puppet theater, engaged in both active and passive gay sex. However, in the 19th century, Ottoman society started to be influenced by European ideas about sexuality as well as the criticism leveled at the Ottoman society by European authors for its sexual and gender norms, including homosexuality. This criticism associated the weakness of the Ottoman state and corruption of the Ottoman government with Ottoman sexual corruption. By the 1850s, these ideas were prompting embarrassment and self-censorship among the Ottoman public regarding traditional attitudes toward sex in general and homosexuality in particular. Dream interpretation literature declined, the puppet theater was purged of its coarser elements, and homoeroticism began to be regarded as abnormal and shameful.
Nonetheless, homosexuality in the Ottoman Empire was decriminalized in 1858, as part of wider reforms during the Tanzimat.
In the 19th and early 20th century, homosexual sexual contact was viewed as relatively commonplace in the Middle East, owing in part to widespread sex segregation, which made heterosexual encounters outside marriage more difficult. According to Georg Klauda, "Countless writers and artists such as André Gide, Oscar Wilde, Edward M. Forster, and Jean Genet made pilgrimages in the 19th and 20th centuries from homophobic Europe to Algeria, Morocco, Egypt, and various other Arab countries, where homosexual sex was not only met without any discrimination or subcultural ghettoization whatsoever, but rather, additionally as a result of rigid segregation of the sexes, seemed to be available on every corner."
With reference to the Muslim world more broadly, Tilo Beckers writes that the modern rejection and criminalization of  "homosexuality in Islam gained momentum through the exogenous effects of European colonialism. . . . " European thought at the time treated homosexuality as "against nature."
According to University of Münster professor Thomas Bauer, for about a thousand years, up to 1979, there is no documented case in the Islamic world in which a man was prosecuted for consensual sexual relations with another man. Although contemporary Islamist movements decry homosexuality as a form of Western decadence, the current prejudice against it among Muslim publics stems from an amalgamation of traditional Islamic legal theory with popular notions that were imported from Europe during the colonial era, when Western military and economic superiority made Western notions of sexuality particularly influential in the Muslim world.
In some Muslim-majority countries, current anti-LGBT laws were enacted by European colonial powers or Soviet organs and retained following independence. The 1860 Indian Penal Code, which included an anti-sodomy statute, was used as a basis of penal laws in other parts of the British empire. Among former British and French colonies, only Jordan, Bahrain, and (more recently) India abolished the criminal penalties for consensual homosexual acts introduced under colonial rule. Persecution of homosexuals has been exacerbated in recent decades by a rise in Islamic fundamentalism and the emergence of the gay-rights movement in the West, which allowed Islamists to paint homosexuality as a noxious Western import. In Iran, several hundred political opponents were executed in the aftermath of the 1979 Islamic Revolution on accusations of homosexuality, and homosexual intercourse is declared a capital offense in Iran's Islamic Penal Code, enacted in 1991. Though the grounds for execution in Iran are difficult to track, there is evidence that several people were hanged for homosexual behavior in 2005-2006 and in 2016, in some cases on dubious charges of rape. In Egypt, though homosexuality is not explicitly criminalized, it has been widely prosecuted under vaguely formulated "morality" laws, and under the current rule of Abdel Fattah el-Sisi arrests of LGBT individuals have risen fivefold, apparently reflecting an effort to appeal to conservatives. In Uzbekistan, an anti-sodomy law, passed after World War II with the goal of increasing the birth rate, was invoked in 2004 against a gay rights activist, who was imprisoned and subjected to extreme abuse. In Iraq, where homosexuality is legal, the breakdown of law and order following the Second Gulf War allowed Islamist militias and vigilantes to act on their prejudice against gays, with ISIS gaining particular notoritety for the gruesome acts of anti-LGBT violence committed under its rule of parts of Syria and Iraq.
Scott Siraj al-Haqq Kugle has argued that, while "Muslims commemorate the early days of Islam when they were oppressed as a marginalized few," many of them now forget their history and fail to protect "Muslims who are gay, transgender and lesbian."

Pederasty

While friendship between men and boys is often described in sexual ways in classical Islamic literature, Khaled El-Rouayheb and Oliver Leaman have argued that it would be misleading to conclude from this that homosexuality was widespread in practice. Such literature tended to use transgressive motifs alluding to what is forbidden, in particular homosexuality and wine. Greek homoerotic motifs may have accurately described practices in ancient Greece, but in their Islamic adaptations they tended to play a satirical or metaphorical rather than descriptive role. At the same time, many miniatures, especially from Ottoman Turkey, contain explicit depictions of pederasty, suggesting that the practice enjoyed a certain degree of popularity. A number of pre-modern texts discuss the possibility of sexual exploitation faced by young boys in educational institutions and warn teachers to take precautions against it.
In modern times, despite the formal disapproval of religious authority, the segregation of women in Muslim societies and the strong emphasis on male virility leads adolescent males and unmarried young men to seek sexual outlets with boys younger than themselves—in one study in Morocco, with boys in the age-range 7 to 13. Men have sex with other males so long as they are the penetrators and their partners are boys, or in some cases effeminate men.
Liwat can therefore be regarded as "temptation", and anal intercourse is not seen as repulsively unnatural so much as dangerously attractive. They believe "one has to avoid getting buggered precisely in order not to acquire a taste for it and thus become addicted." Not all sodomy is homosexual: one Moroccan sociologist, in a study of sex education in his native country,  notes that for many young men heterosexual sodomy is considered better than vaginal penetration, and female prostitutes likewise report the demand for anal penetration from their (male) clients.
It is not so much the penetration as the enjoyment that is considered bad. Deep shame attaches to the passive partner: "for this reason men stop getting laid at the age of 15 or 16 and 'forget' that they ever allowed it earlier." Similar sexual sociologies are reported for other Muslim societies from North Africa to Pakistan and the Far East. In Afghanistan in 2009, the British Army was forced to commission a report into the sexuality of the local men after British soldiers reported the discomfort at witnessing adult males involved in sexual relations with boys. The report stated that though illegal, there was a tradition of such relationships in the country, known as bache bazi or "boy play", and that it was especially strong around North Afghanistan.

Criminalization

According to the International Lesbian and Gay Association (ILGA) seven countries still retain capital punishment for homosexual behavior: Saudi Arabia, Yemen, Iran, Afghanistan, Mauritania, Sudan, and northern Nigeria. In United Arab Emirates it is a capital offense. In Qatar, Algeria, Uzbekistan, and the Maldives, homosexuality is punished with time in prison or a fine. This has led to controversy regarding Qatar, which is due to stage the 2022 FIFA World Cup. Human rights groups have questioned the awarding in 2010 of the right to host the competition, due to the possibility that gay football fans may be jailed. In response, Sepp Blatter, head of FIFA, joked that they would have to "refrain from sexual activity" while in Qatar. He later withdrew the remarks after condemnation from rights groups.
Same-sex sexual activity is illegal in Chad since August 1, 2017 under a new penal code. Homosexuality between consenting adults had never previously been criminalized prior to this law.
In Muslim-majority countries, open gay life rarely exists, but "the closet is spacious." Even countries with strict laws against homosexual people "have flourishing gay scenes at all levels of society."
In Egypt, openly gay men have been prosecuted under general public morality laws. (See Cairo 52.) "Sexual relations between consenting adult persons of the same sex in private are not prohibited as such. However, the Law on the Combating of Prostitution, and the law against debauchery have been used to imprison gay men in recent years."
Islamic state has decreed capital punishment for gays. They have executed more than two dozen men and women for suspected homosexual activity, including several thrown off the top of buildings in highly publicized executions.
In India, which has the third-largest Muslim population in the world, and where Muslims form a large minority, the largest Islamic seminary (Darul Uloom Deoband) has vehemently opposed recent government moves to abrogate and liberalize laws from the British Raj era that banned homosexuality. As of September 2018, homosexuality is no longer a criminal act in India, and most of the religious groups withdrew their opposing claims against it in the Supreme Court.
In Iraq, homosexuality is allowed by the government, but terrorist groups often carry out illegal executions of gay people. Saddam Hussein was "unbothered by sexual mores." Ali Hili reports that "since the 2003 invasion more than 700 people have been killed because of their sexuality." He calls Iraq the "most dangerous place in the world for sexual minorities."
In Jordan, where homosexuality is legal, "gay hangouts have been raided or closed on bogus charges, such as serving alcohol illegally."
In Pakistan, its law is a mixture of both Anglo-Saxon colonial law as well as Islamic law, both which proscribe criminal penalties for same-sex sexual acts. The Pakistan Penal Code of 1860, originally developed under colonialism, punishes sodomy with a possible prison sentence and has other provisions that impact the human rights of LGBT Pakistanis, under the guise of protecting public morality and order. Yet, the more likely situation for gay and bisexual men is sporadic police blackmail, harassment, fines, and jail sentences.
In Saudi Arabia, the maximum punishment for homosexual acts is public execution by beheading. However the government usually uses lesser punishments—for example, fines, time in prison, and whipping—as alternatives.
In Turkey, homosexuality is legal, but "official censure can be fierce". A former interior minister, İdris Naim Şahin, called homosexuality an example of "dishonour, immorality and inhuman situations".

Death penalty

In 2016, the International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA)  released its most recent State Sponsored Homophobia Report. The report found that thirteen countries or regions impose the death penalty for "same-sex sexual acts" with reference to sharia-based laws. The death penalty is implemented nationwide in Iran, Saudi Arabia, Sudan, and Yemen; implemented locally in Nigeria (12 northern states) and Somalia (southern parts); allowed by the law but not implemented in Afghanistan, Mauritania, Pakistan, and the United Arab Emirates; implemented through non-state courts by ISIS in parts of Iraq and Syria. Brunei's Sharia Penal Code, implemented in stages since 2014, also prescribes death by stoning as punishment for sex between men.

Legalization

The Ottoman Empire (predecessor of Turkey) decriminalized homosexuality in 1858. In Turkey, where 99.8% of the population is Muslim, homosexuality has never been criminalized since the day it was founded in 1923. And LGBT people also have the right to seek asylum in Turkey under the Geneva Convention since 1951.
Same-sex sexual intercourse is legal in Albania, Azerbaijan, Bahrain, Bosnia and Herzegovina, Burkina Faso, Djibouti, Guinea-Bissau, Iraq (except those parts controlled by the Islamic State), Jordan, Kazakhstan, Kosovo, Kyrgyzstan, Mali, Niger, Tajikistan, Turkey, West Bank (State of Palestine), most of Indonesia, and in Northern Cyprus. In Albania and Turkey, there have been discussions about legalizing same-sex marriage. Albania, Northern Cyprus and Kosovo also protect LGBT people with anti-discrimination laws.
In 2016, the International Lesbian, Gay, Bisexual, Trans and Intersex Association (ILGA)  released its most recent State Sponsored Homophobia Report. The report found that "same-sex sexual acts" are legal in 121 countries. These countries comprise 63% of the countries in the United Nations. Of these 121 countries, twenty-one are in Africa, nineteen are in Asia, twenty-four are in the Americas, forty-eight are in Europe, and seven are in Oceania. The full report with the names of countries in which same-sex acts are legal or illegal can be read at State Sponsored Homophobia 2016.

Same-sex marriage

In 2007 there was a gay party in the Moroccan town of al-Qasr al-Kabir. Rumours spread that this was a gay marriage and more than 600 people took to the streets, condemning the alleged event and protesting against leniency towards homosexuals. Several persons who attended the party were detained and eventually six Moroccan men were sentenced to between four and ten months in prison for "homosexuality".
In France there was an Islamic same-sex marriage on February 18, 2012. In Paris in November 2012 a room in a Buddhist prayer hall was used by gay Muslims and called a "gay-friendly mosque", and a French Islamic website is supporting religious same-sex marriage.
The first American Muslim in the United States Congress, Keith Ellison (D-MN) said in 2010 that all discrimination against LGBT people is wrong. He further expressed support for gay marriage stating:
I believe that the right to marry someone who you please is so fundamental it should not be subject to popular approval any more than we should vote on whether blacks should be allowed to sit in the front of the bus.
In 2014 eight men were jailed for three years by a Cairo court after the circulation of a video of them allegedly taking part in a private wedding ceremony between two men on a boat on the Nile.

Chechnya concentration camps

Since February 2017, over 100 male residents of the Chechen Republic (part of the Russian Federation) assumed to be gay or bisexual have been rounded up, detained and tortured by authorities on account of their sexual orientation. These crackdowns have been described as part of a systemic anti-LGBT "purge" in the region. The men are held and allegedly tortured in concentration camps.
Allegations were initially reported in Novaya Gazeta on April 1, 2017 a Russian-language opposition newspaper, which reported that over 100 men have allegedly been detained and tortured and at least three people have died in an extrajudicial killing. The paper, citing its sources in the Chechen special services, called the wave of detentions a "prophylactic sweep." The journalist who first reported on the subject has gone into hiding, There have been calls for reprisals for journalists reporting on the situation.
In response, the Russian LGBT Network is attempting to assist those who are threatened to evacuate from Chechnya. Human rights groups and foreign governments have called upon Russia and Chechnya to put an end to the internments.

Public opinion among Muslims

In 2011, the UN Human Rights Council passed its first resolution recognizing LGBT rights, which was followed up with a report from the UN Human Rights Commission documenting violations of the rights of LGBT people. The two world maps of the percentage of Muslims per country and the countries that support LGBT rights at the UN give an impression of the attitude towards homosexuality on the part of many Muslim-majority governments.
The Muslim community as a whole, worldwide, has become polarized on the subject of homosexuality. Some Muslims say that "no good Muslim can be gay," and "traditional schools of Islamic law consider homosexuality a grave sin." At the opposite pole, "some Muslims . . . are welcoming what they see as an opening within their communities to address anti-gay attitudes." Especially, it is "young Muslims" who are "increasingly speaking out in support of gay rights".

Defunct movements

The Al-Fatiha Foundation was an organization which tried to advance the cause of gay, lesbian, and transgender Muslims. It was founded in 1998 by Faisal Alam, a Pakistani American, and was registered as a nonprofit organization in the United States. The organization was an offshoot of an internet listserve that brought together many gay, lesbian and questioning Muslims from various countries. The Foundation accepted and considered homosexuality as natural, either regarding Qur'anic verses as obsolete in the context of modern society, or stating that the Qu'ran speaks out against homosexual lust and is silent on homosexual love. After Alam stepped down, subsequent leaders failed to sustain the organization and it began a process of legal dissolution in 2011.
In 2001, Al-Muhajiroun, an international organization which sought the establishment of a global Islamic caliphate, but which is now a banned and defunct, issued a fatwa (ruling) declaring that all members of Al-Fatiha were murtadd (apostates), and condemning them to death. Because of this threat and their conservative familial backgrounds, many Al-Fatiha members chose anonymity to protect their identity. Al-Fatiha had fourteen chapters in the United States, as well as offices in England, Canada, Spain, Turkey, and South Africa.

Ex-gay groups

There are also a number of Islamic ex-gay groups, that is, those composed of people claiming to have experienced a basic change in sexual orientation from exclusive homosexuality to exclusive heterosexuality). These groups, like those based in socially conservative Christianity, are aimed at attempting to guide homosexuals towards heterosexuality. A large body of research and global scientific consensus indicates that being gay, lesbian, or bisexual is compatible with normal mental health and social adjustment. Because of this, major mental health professional organizations discourage and caution individuals against attempting to change their sexual orientation, and warn that attempting to do so can be harmful. People who have gone through conversion therapy face 8.9 times the rates of suicide ideation, face depression at 5.9 times the rate of their peers and are three times more likely to use illegal drugs compared to those who did not go through the therapy (although these statistics do not refer to Muslims specifically).

Gay prayer room (France)

In November 2012, a prayer room was set up in Paris by gay Islamic scholar and founder of the group 'Homosexual Muslims of France' Ludovic-Mohamed Zahed. It was described by the press as the first gay-friendly mosque in Europe. The reaction from the rest of the Muslim community in France has been mixed. The opening has been condemned by the Grand Mosque of Paris.

Imaan (UK)

Imaan, a social support group for Muslim LGBT people and their families, exists in the UK. Imaan, like Al-Fatiha, was founded by gay Pakistani activists.

Inclusive Mosque Initiative (UK)

Inclusive Mosque Initiative, a grassroots activist organisation founded in 2012, which works toward "establishing a place of worship for the promotion and practice of an inclusive Islam".

Marhaba (Australia)

Nur Wahrsame has been an advocate for LGBTQ Muslims. He founded Marhaba, a support group for queer Muslims in Melbourne, Australia. In May 2016, Wahrsage revealed that he is homosexual in an interview on SBS2's The Feed, being the first openly gay Imam in Australia.

Muslim Alliance for Sexual and Gender Diversity (USA)

The Muslim Alliance for Sexual and Gender Diversity (MASGD) in the United States began on January 23, 2013. It supports, empowers and connects LGBTQ Muslims. It aims "to increase the acceptance of gender and sexual diversity within Muslim communities." On June 20, 2016, an interview with Mirna Haidar (a member of the MASGD's steering committee) was published in The Washington Post. She described the MASGD as supporting "LGBT Muslims who want or need to embrace both their sexual and religious identities." Haidar said that the support the MASGD provides is needed because a person who is "Muslim and queer " faces "two different systems of oppression": Islamophobia and homophobia.

Muslims for Progressive Values (USA & Malaysia)

Muslims for Progressive Values, based in the United States and in Malaysia, is "a faith-based, grassroots, human rights organization that embodies and advocates for the traditional Qur'anic values of social justice and equality for all, for the 21st Century." MPV has recorded "a lecture series that seeks to dismantle the religious justification for homophobia in Muslim communities." The lectures can be viewed at MPV Lecture Series.

Safra Project (UK)

The Safra Project for women is based in the UK. It supports and works on issues relating to prejudice LGBTQ Muslim women. It was founded in October 2001 by Muslim LBT women. The Safra Project's "ethos is one of inclusiveness and diversity."

Salaam (Canada)

Salaam is the first gay Muslim group in Canada and second in the world. Salaam was found in 1993 by El-Farouk Khaki, who organized the Salaam/Al-Fateha International Conference in 2003.

Sarajevski Otvoreni Centar

Sarajevski Otvoreni Centar (Sarajevo Open Centre), abbreviated SOC, is an independent feminist civil society organization and advocacy group which campaigns for lesbian, gay, bisexual, trans and intersex (LGBTI) people and women rights in Bosnia and Herzegovina. The organization also gives asylum and psychological support to victims of discrimination and violence.
The Pink Report is an annual report made by the organization on the state of the Human Rights of LGBTI People in the country and is supported by the Norwegian Embassy.

Toronto Unity Mosque / el-Tawhid Juma Circle (Canada)

In May 2009, the Toronto Unity Mosque / el-Tawhid Juma Circle was founded by Laury Silvers, a University of Toronto religious studies scholar, alongside Muslim gay-rights activists El-Farouk Khaki and Troy Jackson. Unity Mosque/ETJC is a gender-equal, LGBT+ affirming, mosque.

Media designed to reduce prejudice

The religious conflicts and inner turmoil with which Islamic homosexuals struggle have been addressed in various media.

Channel 4

The goals of Channel 4 include (1) stimulate public debate on contemporary issues, (2) reflect cultural
diversity of the UK, and (3) champion alternative points of view. One of Channel 4's productions is a documentary on Gay Muslims, broadcast in the UK in January 2006. It can be viewed on YouTube in six parts: Gay Muslims - UK - Part 1 of 6, Gay Muslims - UK - Part 2 of 6, Gay Muslims - UK - Part 3 of 6, Gay Muslims - UK - Part 4 of 6, Gay Muslims - UK - Part 5 of 6, Gay Muslims - UK - Part 6 of 6

Unity Productions Foundation

The Unity Productions Foundation (UPF) works for "Peace through the Media" by producing films "to break down stereotypes and enhance understanding" of Muslims and Islam. UPF films have been seen by approximated 150 million people. UPF has "partnered with prominent Jewish, Muslim, Christian and interfaith groups to run dialogues nationwide." Videos of non-Muslims speaking up for Muslims as "fellow Americans" are online at Non-Muslims Speak Up.

Muslim Debate Initiative

The Muslim Debate Initiative (MDI) made up of Muslims "with experience in public speaking, apologetics, polemics, research and community work." One of its aims is "to support, encourage and promote debate that contrasts Islam against other intellectual and political discourses for the purpose of the pursuit of truth, intellectual scrutiny with respect, and the clarifying accurate understandings of other worldviews between people of different cultures, beliefs and political persuasions." One of its broadcasts was on BBC3's "Free Speech" program on March 25, 2014. The debate was between Maajid Nawaz and Abdullah al Andalusi on the question "Can you be Gay and Muslim?" It is on YouTube at "Gay and Muslim?".

A Jihad for Love

In 2007, the documentary film A Jihad for Love was released. It was produced by Sandi Simcha DuBowski and directed by Parvez Sharma. As of 2016 the film has been shown in 49 nations to four million plus viewers.

See two parts of the film at A Jihad for Love Part 1 and A Jihad for Love Part 2. Also a video about A Jihad for Love is at "About a Jihad for Love".

A Sinner in Mecca

In 2015, the documentary film A Sinner in Mecca was released. It was directed by Parvez Sharma. The film chronicles Sharma's Hajj pilgrimage to Mecca, Saudi Arabia as an openly gay Muslim. The film premiered at the 2015 Hot Docs Canadian International Documentary Festival to great critical acclaim. The film opened in theaters in the US on September 4, 2015 and is a New York Times Critics' Pick.

My.Kali

My.Kali is a Jordanian pan-Arab LGBT publication published in English in Amman, Jordan. It started publication online in 2008. It is named after openly gay model Khalid, making major headlines, as it is the 1st LGBT publication to ever exist in the MENA region. The magazine regularly features non-LGBT artists on their covers to promote acceptance among other communities and was the first publication to give many underground and regional artists their first covers like Yasmine Hamdan, Hamed Sinno, lead singer of the band Mashrou' Leila, Alaa Wardi, Zahed Sultan and many more.

Books supporting LGBT Muslims

This section contains material from books and articles supporting LGBT Muslims.

Progressive Muslims: On Justice, Gender, and Pluralism

In Chapter Eight of the 2003 book, Progressive Muslims: On Justice, Gender, and Pluralism, Scott Siraj al-Haqq Kugle asserts "that Islam does not address homosexuality." In Fugle's reading, the Qur'an holds "a positive assessment of diversity." It "respects diversity in physical appearance, constitution, stature, and color of human beings as a natural consequence of Divine wisdom in creation." Therefore, Islam can be described as "a religion that positively assesses diversity in creation and in human societies." Furthermore, in Kugle's reading, the Qur'an "implies that some people are different in their sexual desires than others." Thus, homosexuality can be seen as part of the "natural diversity in sexuality in human societies." This is the way "gay and lesbian Muslims" view their homosexuality.
In addition to the Qur'an, Kugle refers to the benediction of Imam Al-Ghazali (the 11th-century Muslim theologian) which says. "praise be to God, the marvels of whose creation are not subject to the arrows of accident." For Kugle, this benediction implies that "if sexuality is inherent in a person's personality, then sexual diversity is a part of creation, which is never accidental but is always marvelous." Kugle also refers to "a rich archive of same-sex sexual desires and expressions, written by or reported about respected members of society: literati, educated elites, and religious scholars." Given these writings, Kugle concludes that "one might consider Islamic societies (like classical Greece) to provide a vivid illustration of a 'homosexual-friendly' environment." This evoked from "medieval and early modern Christian Europeans" accusations that Muslim were "engaging openly in same-sex practices."
Kugle goes a step further in his argument and asserts that "if some Muslims find it necessary to deny that sexual diversity is part of the natural created world, then the burden of proof rests on their shoulders to illustrate their denial from the Qur'anic discourse itself."

Islam and Homosexuality

In 2010, an anthology Islam and Homosexuality was published. In the Forward, Parvez Sharma sounded a pessimistic note about the future: "In my lifetime I do not see Islam drafting a uniform edict that homosexuality is permissible." Following is material from two chapters dealing with the present.
Rusmir Musić in a chapter "Queer Visions of Islam" said that "Queer Muslims struggle daily to reconcile their sexuality and their faith." Musić began to study in college "whether or not my love for somebody of the same gender disgusts God and whether it will propel me to hell. The answer, for me, is an unequivocal no. Furthermore, Musić wrote, "my research and reflection helped me to imagine my sexuality as a gift from a loving, not hateful, God."
Marhuq Fatima Khan in a chapter "Queer, American, and Muslim: Cultivating Identities and Communities of Affirmation," says that "Queer Muslims employ a few narratives to enable them to reconcile their religious and sexual identities." They "fall into three broad categories: (1) God Is Merciful; (2) That Is Just Who I Am; and (3) It's Not Just Islam."

Sexual Ethics and Islam

Kecia Ali in her 2016 book Sexual Ethics and Islam says that p xvi "there is no one Muslim perspective on anything." Regarding the Qur'an, Ali says that modern scholars disagree about what it says about "same-sex intimacy." Some scholars argue that "the Qur'an does not address homosexuality or homosexuals explicitly."
Regarding homosexuality, Ali, says that the belief that "exclusively homosexual desire is innate in some individuals" has been adopted "even among some relatively conservative Western Muslim thinkers."100 Homosexual Muslims believe their homosexuality to be innate and view "their sexual orientation as God-given and immutable."123 She observes that  "queer and trans people are sometimes treated as defective or deviant," and she adds that it is "vital not to assume that variation implies imperfection or disability."
Regarding "medieval Muslim culture," Ali says that "male desire to penetrate desirable youth . . . was perfectly normal." Even if same-sex relations were not lawful, there was "an unwillingness to seek out and condemn instances of same-sex activity, but rather to let them pass by . . . unpunished." Ali states that some scholars claim that Islamic societies were 'homosexual-friendly' in history. (Oneworld Publications, Exp Rev edition 2016), 100.</ref> 
In an article "Same-sex Sexual Activity and Lesbian and Bisexual Women" Ali elaborates on homosexuality as an aspect of medieval Muslim culture. She says that "same-sex sexual expression has been a more or less recognized aspect of Muslim societies for many centuries." There are many explicit discussions of "same-sex sexual activity" in medieval Arabic literature. Ali states there is a lack of focus in medieval tradition on female same-sex sexual activity, where the Qur'an mainly focuses male/male sex. With female same-sex sexual activity there is more focus on the punishment for the acts and the complications with the dower, compare to men where there is a focus on punishment but also the needs to ablutions and the affect of the act on possible marriage decisions. (Oneworld Publications, Exp Rev edition 2016), 101.</ref>

Gender variant and transgender people

In Islam, the term mukhannathun is used to describe gender-variant people, usually male-to-female transgender.  Neither this term nor the equivalent for "eunuch" occurs in the Quran, but the term does appear in the Hadith, the sayings of Muhammad, which have a secondary status to the central text.  Moreover, within Islam, there is a tradition on the elaboration and refinement of extended religious doctrines through scholarship.  This doctrine contains a passage by the scholar and hadith collector An-Nawawi:
A mukhannath is the one ("male") who carries in his movements, in his appearance and in his language the characteristics of a woman. There are two types; the first is the one in whom these characteristics are innate, he did not put them on by himself, and therein is no guilt, no blame and no shame, as long as he does not perform any (illicit) act or exploit it for money (prostitution etc.). The second type acts like a woman out of immoral purposes and he is the sinner and blameworthy.
While Iran has outlawed homosexuality, Iranian Shi'a thinkers such as Ayatollah Khomeini have allowed for transgender people to change their sex so that they can enter heterosexual relationships. This position has been confirmed by the Supreme Leader of Iran, Ayatollah Ali Khamenei, and is also supported by many other Iranian clerics.
Iran carries out more sex change operations than any other nation in the world except for Thailand. It is regarded as a cure for homosexuality, which is punishable by death under Iranian law. The government even provides up to half the cost for those needing financial assistance and a sex change is recognized on the birth certificate.
On the 26th of June 2016, clerics affiliated to the Pakistan-based organization Tanzeem Ittehad-i-Ummat issued a fatwa on transgender people where a transwoman (born male) with "visible signs of being a woman" are allowed to marry a man, and a transman (born female) with "visible signs of being a man" are allowed to marry a woman. Muslim ritual funerals also apply. Depriving transgender people of their inheritance, humiliating, insulting or teasing them were also declared haraam.