The Prophet ﷺ cursed effeminate men and masculine women, and he said, "Expel them from your homes."The Prophet ﷺ expelled so-and-so, and Umar expelled so-and-so.
لعن النبي ﷺ المخنثين من الرجال، والمترجلات من النساء. وقال: أخرجوهن من بيوتكم قال: فأخرج النبي ﷺ فلانا، وأخرج عمر فلانا.
Bukhari narrated it in the Book of Clothing (5886) from Muaz bin Fadala, he said, Hisham narrated to us, from Yahya, from Ikrima, from Ibn Abbas, and he mentioned it.In another narration by Bukhari (5885), "Men who imitate women, and women who imitate men."The khuntha (intersex person) is one who is created with both a man's penis and a woman's vulva, and there are four possible cases.The first, he is able to have intercourse with a woman and does not menstruate, so his ruling is that of a man in purification, acts of worship, inheritance, and other matters.The second, she menstruates and is not able to have intercourse with a woman, so her ruling is that of a woman in purification, acts of worship, inheritance, and similar matters.The third, she menstruates and is able to have intercourse with a woman, so her ruling is that of a woman in purification, acts of worship, and inheritance, and this is the more cautious position.The fourth, he does not menstruate and is not able to have intercourse with a woman. In this case one looks at how he urinates. If he urinates as a man urinates, his ruling is that of a man, and if he urinates as a woman urinates, his ruling is that of a woman.If he urinates from both organs, then this is what is called in jurisprudence the "ambiguous khuntha," and his ruling is left to the judgment of the jurist, who looks at the predominant feature and rules according to what is most cautious and most fitting. Each case has its own specific ruling, and no other case may be measured against it.In all of these cases it is permissible to perform a surgical operation to correct the defect, along with accepting Allah's decree and predestination, bearing hardships with patience, and seeking one's reward from Allah, may He be exalted.The mukhannath is a man who is feminine. If he was created this way, then there is no sin on him, no blame, no wrongdoing, and no punishment, and such a person is permitted to enter upon women.Some scholars have cited as evidence the words of Allah, "or male attendants who have no sexual desire" [Nur 24:31]. Ibn Abbas said, "Those who have no sexual desire" refers to the mukhannath.Mujahid and Qatada said, "The one who has no need for women," meaning he has no desire for them.Such a person's testimony is accepted, and it is permissible to pray behind him, except that Zuhri said, "We do not think one should pray behind the mukhannath, except out of unavoidable necessity." Bukhari mentioned this (695). He means that he should have dominance and authority.As for one who deliberately imitates women in speech, actions, dress, and other matters, and likewise a woman who imitates men in speech, actions, dress, and other matters, this is blameworthy, and it is this that the sahih hadiths address concerning cursing such a person, removing him from houses, and banishing him from them.