Mukhannathun

Mukhannathun (Arabic مخنثون "effeminate ones", "men who resemble women", singular mukhannath) are gender-variant (typically male-to-female transsexual) persons of the Islamic faith who are accepted within the boundaries of Islam.

Reports of Mukhannathun from Hadith and Suna
The scholar and hadith collector An-Nawawi wrote: '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.'

Further on, An-Nawawi explains that the negative hadith reports only mean the second kind, not the mukhannathīn (plural) in general.

Although some Muslims today claim that a transsexual should be punished severely, there is no such report from Muhammad's life. In fact, even long after the time of Muhammad, Muslims accepted the mukhannathun in the sacred boundaries of Islam. This is backed up by reliable hadith reports such as the following.

Sunan Abu-Dawud, Book 41, Number 4910:

Narrated AbuHurayrah:

A mukhannath who had dyed his hands and feet with henna was brought to the Prophet (peace_be_upon_him). He asked: What is the matter with this man? He was told: Apostle of Allah! he affects women's get-up. So he ordered regarding him and he was banished to an-Naqi'. The people said: Apostle of Allah! should we not kill him? He said: I have been prohibited from killing people who pray. AbuUsamah said: Naqi' is a region near Medina and not a Baqi (in other words not referring to Jannat al-Baqi cemetery. Indicating they were not punished.)'

Gender/sexuality
The sexuality and gender identification of the Mukhannathun is not exactly in line with modern western ideas of LGBT persons. While they were certainly not straight, it cannot be said that all of them were homosexual. According to Imam Mushin Hendricks:

Muhammad did deal with a group of effeminate men in Medina called “Mukhannathun”.However, while this group of Mukhannathun did possess qualities of modern gay men, it cannot be said that the Mukhannathun fully represents modern gay men, as they were involved in practices not common to contemporary gay men.

In Joan Roughgarden describes these specific people at length. One of whom named Hit is actually mentioned in the Hadith of Sunan Abu Dawud book 32 number 4095. She describes what Hit did which is exactly the event passed down by Aisha. Arab Scholars would note that "'Granting a "license to be with women" was appropriate only for "one whose limbs are languid and whose tongue has a lisp by way of gentle natural constitution, and who has no desire for women.'" .  Furthermore there is the observation of Ibn Abd Al-Barr who was a contemporary of An-Nawawi "The mukhannath is not only the one who is known to be promiscuous. The mukhannath is (also?) the one who looks so much like a woman physically that he resembles women in his softness, speech, appearance, accent and thinking. If he is like this, he would have no desire for women and he would not notice anything about them. This is one of those who have no interest in women who were permitted to enter upon women. " Dr Roughgarden goes on to describe two more Mukhannathun who were contemporary to the Prophet Muhammad Tuways and Al-Dalal. Tuways was a talented musician and singer who lived to the age of 82 .  Tuways is known to have married and fathered children .  Then there is Al-Dalal who primarily was attracted to men but is known to have had one sexual encounter with a woman on her wedding night .  Then later that same night had sexual relations with the groom .  In response to this it was ordered that all Mukhannathun should hence forth be castrated.  Some of their responses to this order are recorded to this day.        Although the castration of mukhannathun as punishment begins a repressive period for gender-variant people in Mecca and Medina, the supposed victims showed curious reactions: Tuways: "This is simply a circumcision which we must undergo again." al-Dalal: "Or rather the Greater Circumcision!" Nasim al-Sahar: "With castration I have become a mukhannath in truth!" Nawmat al-Duha: "Or rather we have become women in truth!" Bard al-Puad: "We have been spared the trouble of carrying around a spout for urine." Zill al-Shajar: "What would we do with an unused weapon anyway?"

Reports of gender-variant entertainers resurface one hundred years later, in A.D. 813, again using the tambourine-like duff, together with a particular drum and a long-necked lute called a tunbar. Wit, more than music, now defined the presentation, described as "savage mockery, extravagant burlesque, and low sexual humor. In contemporary western terms the Mukhannathun were transsexual/transgendered women (MTF) who lived as women and were for the most part treated as such. They were known for engaging in entertainment, domestic services, and matchmaking to support themselves.  Not all of them were attracted to men.  Only those who were attracted to men exclusively, to the point of not even being able to tell if a woman is pretty or not, or had been castrated would be allowed into women's private spaces. In their times they were not considered to be women it was recognized that they were men physically.  However quite literally they were "men who resemble women" or Mukhannathun.  The group that most resembles the way of the Mukhanathun around the time of Muhammad would be the Muslim Hijra of Pakistan and northern India who when speaking Arabic refer to themselves as Mukhannathun.