Is being transgender haram?
Question 1005
Question
Is it haram to be transgender in Islam, and may a trans Muslim live according to their gender?
Summary of answer
Being transgender is halal. Allah creates what He wills (42:49) and has honored every child of Adam (17:70). Gender-variant people known as mukhannathūn lived openly in Medina in the Prophet's ﷺ time; his wives counted one among the men without desire named in 24:31, and he refused to have another killed. Classical commentators held that a person whose nature differs bears no blame, and modern fatwas in Iran and Egypt opened the way to surgical transition.
Answer
الحمد لله Praise be to Allah.

Transgender Muslims often grow up hearing that who they are is a rebellion against Allah. The Quran and the Sunnah teach something kinder. Being transgender is halal. Allah creates what He wills and has honored every human being, people of varied gender lived openly in Medina in the Prophet’s ﷺ time, and the classical scholars held that a person whose nature differs bears no blame for it. A trans Muslim may live according to their gender, pray, marry, and serve Allah as fully as anyone.
Is it haram to be transgender in Islam?
Being transgender means that a person’s gender differs from the sex recorded at their birth. No one chooses this, and the Quran reminds us that creation is Allah’s to shape:
لِّلَّهِ مُلۡكُ ٱلسَّمَٰوَٰتِ وَٱلۡأَرۡضِۚ يَخۡلُقُ مَا يَشَآءُ
“To Allah belongs the dominion of the heavens and the earth. He creates whatever He wills.”
Human beings come in more variety than any simple scheme allows. The classical jurists knew this well. They wrote detailed rulings for intersex people (khunthā, خنثى) on prayer, inheritance, and marriage, and they gave such a person a place in every chapter of the law. A transgender person is likewise a servant of Allah whose inner life He knows better than anyone.
Were there transgender people in the time of the Prophet ﷺ?
Yes. Medina had people known as mukhannathūn (مخنثون), people assigned male who lived in a feminine manner. The Quran itself names “male attendants who have no desire” among those before whom women may relax their covering:
أَوِ ٱلتَّـٰبِعِينَ غَيۡرِ أُوْلِي ٱلۡإِرۡبَةِ مِنَ ٱلرِّجَالِ
“…or male attendants who have no desire.”
Aisha (may Allah be pleased with her) reported that a mukhannath used to visit the Prophet’s ﷺ wives freely, because they counted him among these men (Sahih Muslim 2181). The Prophet ﷺ later barred that man from the women’s quarters after he described a woman’s body in detail to a man, a breach of the trust that had given him access (Sahih al-Bukhari 5235). The ruling concerned his indiscretion, and mukhannathūn remained part of the city’s life for generations afterward.
When a mukhannath who had dyed his hands and feet with henna was brought to the Prophet ﷺ, he was sent away to al-Naqīʿ outside the city. Some of those present asked whether they should kill him, and the Prophet ﷺ answered:
«إِنِّي نُهِيتُ عَنْ قَتْلِ الْمُصَلِّينَ»
“I have been forbidden to kill people who pray.”
Sunan Abi Dawud 4928 (graded sahih by al-Albani)
In the generation after the Prophet ﷺ, the most celebrated singer of Medina, Ṭuways, was a mukhannath. The historian Everett Rowson’s study “The Effeminates of Early Medina” (1991) shows how present these people were in the city’s music and social life.
What about the hadith cursing men who imitate women?
Sahih al-Bukhari 5886 reports that the Prophet ﷺ cursed men who make themselves like women and women who make themselves like men. Classical commentators read this narrowly. Al-Nawawi (d. 1277) distinguished people whose manner was part of their nature from those who put it on, and Ibn Hajar (d. 1449) held that a person who could not change it bore no blame.
Building on that classical distinction, the stronger view (al-rājiḥ) holds that the hadith concerns people who put on the manner of another gender for mockery or deception, and that a transgender person, whose gender is part of how Allah made them, falls outside it entirely. Living as who you are is truthfulness, and the Quran asks of every soul only what lies within its power (2:286).
What do modern scholars say?
Two of the most influential rulings of the twentieth century opened the way to transition. Ayatollah Ruhollah Khomeini permitted sex reassignment, and after his fatwa of 1987 Iran began to recognize legal gender change. In Egypt in 1988, the Grand Mufti Muhammad Sayyid Tantawi issued a fatwa permitting surgery when a trustworthy doctor finds a cause in the body itself, reasoning in the classical law’s terms for intersex people. The details and limits of both rulings are set out in Is sex reassignment surgery allowed in Islam?
How should Muslims treat transgender people?
The Quran grants dignity (karāma) to every human being before any question of belief or behavior:
۞وَلَقَدۡ كَرَّمۡنَا بَنِيٓ ءَادَمَ
“We have honored the children of Adam.”
Honor a trans Muslim by using the name they use, welcoming them in the rows of prayer, and defending them from mockery. The Prophet ﷺ said that a Muslim does not wrong, abandon, or look down on a fellow Muslim (Sahih Muslim 2564a). Harassing anyone about their faith or their body is haram (Is it haram to harass women about hijab or religion?), and parents owe their trans children the same mercy they owe every child (Is it permissible to disown your child for being gay?). Inclusive mosques that welcome trans Muslims now exist in many cities (Are there LGBTQ-friendly and inclusive mosques?).
If you are a trans Muslim who feels alone, Hidayah supports LGBT+ Muslims in the UK, Muslims for Progressive Values offers community in North America, and young people in the US can reach The Trevor Project at any hour.
A closing word
Allah describes His own work in the human being with pride:
لَقَدۡ خَلَقۡنَا ٱلۡإِنسَٰنَ فِيٓ أَحۡسَنِ تَقۡوِيمٖ
“We created the human being in the finest form.”
May Allah let every trans believer see that finest form in themselves, and surround them with people who see it too.
And Allah knows best. والله أعلم
Frequently asked questions
Where does a transgender Muslim pray in the mosque?
The stronger view is that a person prays in the rows of the gender they live in. The classical jurists already made room in the rows for intersex people (khunthā), and the mosque should welcome every believer who comes to pray.
Is being non-binary haram?
The same principles apply. Allah creates as He wills, the classical law recognized people who did not fit neatly into two categories, and every person's dignity is honored in the Quran.
What is the Shia view on transgender people?
Ayatollah Khomeini ruled that sex reassignment is permissible, and since his fatwa of 1987 Iran has recognized legal gender change. The ruling remains in force in Iran today.
Is it haram for a trans person to dress according to their gender?
No. Dressing according to the gender Allah gave you in your heart is part of living truthfully. The classical scholars held that a person whose manner is part of their nature bears no blame for it.
Related questions
Sources
- Sahih Muslim 2181 (the mukhannath counted among those without desire)
- Sunan Abi Dawud 4928 (I have been forbidden to kill those who pray)
- Everett K. Rowson, "The Effeminates of Early Medina," Journal of the American Oriental Society 111:4 (1991), 671–693
- Ibn Hajar al-ʿAsqalani, Fatḥ al-Bārī (commentary on Sahih al-Bukhari 5886)
- Scott Siraj al-Haqq Kugle, Living Out Islam: Voices of Gay, Lesbian, and Transgender Muslims (NYU Press, 2014)
Image: Phillip Maiwald (Nikopol), The inner dome of the Sheikh Lotfollah Mosque, Isfahan, 2008. CC BY-SA 3.0, via Wikimedia Commons.. Image credits