Is masturbation haram?

Question 1007

Question

Is masturbation haram in Islam, or is it permissible or only disliked (makruh)?

Summary of answer

Masturbation is permissible, on the stronger view. No verse of the Quran or sound hadith mentions it, and the Quran says Allah has spelled out what He forbids (6:119). Ibn Hazm judged it disliked at most, a report from Imam Ahmad compares it to bloodletting, and Hanafi jurists excused it for a person who fears falling into zina. Malik and al-Shafiʿi forbade it, reading it into 23:7; that is a recognized opinion.

Answer

الحمد لله Praise be to Allah.

A square panel of white Iznik tiles patterned with red, cobalt, and green flowers and leaves inside a scalloped red border.

Few questions weigh on young Muslims as heavily as this one, and few are asked with so much shame. The answer of the tradition is calmer than the fear. Masturbation is permissible, on the stronger view (al-rājiḥ). No verse of the Quran and no sound hadith mentions it, and some of the greatest jurists of Islam, Ibn Hazm of Córdoba and Imam Ahmad ibn Hanbal in one report, held that it carries no sin. The scholars differed (ikhtalafa al-ʿulamāʾ), and the stricter view deserves a fair hearing, but the evidence leans toward ease.

Is masturbation haram in Islam?

The Quran teaches that Allah has made His prohibitions clear:

وَقَدۡ فَصَّلَ لَكُم مَّا حَرَّمَ عَلَيۡكُمۡ

“He has spelled out for you what He has forbidden you.”

Quran 6:119

The jurists drew a principle from verses like this one: in matters of daily life, things are permitted unless a clear text forbids them. The Quran warns believers against forbidding what Allah has made good and lawful (Quran 5:87). Masturbation (istimnāʾ, استمناء) appears nowhere in the Quran, and no sound hadith speaks of it; the sayings cursing it that circulate online have no reliable chain. The ruling must therefore be reasoned out, and that is where the schools part ways.

What did the classical scholars say?

Ibn Hazm and the Zahiri school

Ibn Hazm (d. 1064), the great jurist of al-Andalus, wrote in al-Muḥallā that masturbation is permitted, because Allah has spelled out everything He forbids and this is not among those things. He added only a mild dislike: “We dislike it, because it is not among the noble traits of character or the virtues.” He applied the same ruling to women and men. He also recorded that among the Successors (tābiʿūn), al-Ḥasan al-Baṣrī saw no harm in it, and Jābir ibn Zayd called it “your own water” to release if you wish.

Imam Ahmad and the Hanbali school

Imam Ahmad ibn Hanbal (d. 855) is reported to have compared semen to other bodily excesses and allowed its release as bloodletting is allowed. Ibn Taymiyya (d. 1328) noted that two reports come from Ahmad, one forbidding it and one holding it disliked but not forbidden, and later Hanbali jurists permitted it for a person who fears falling into zina and cannot marry.

The Hanafi school

Hanafi jurists generally disliked masturbation, and many called the dislike strong. Yet they too made room for need. Ibn ʿAbidin (d. 1836), the authority of the later school, recorded that for a person who fears zina, “it is hoped that there is no burden on him.”

The Maliki, Shafiʿi, and Jaʿfari view

Imam Malik (d. 795) and Imam al-Shafiʿi (d. 820) forbade it. They read it into the verse that praises believers who guard their private parts except with their spouses, and then says: “Whoever seeks beyond that, they are the transgressors” (Quran 23:7). Jaʿfari jurists hold the same view. Some also cite the hadith in which the Prophet ﷺ advised young people who cannot yet marry to fast (Sahih al-Bukhari 5065). This is a recognized opinion held by great imams.

Which view is stronger?

The verse in Sūrat al-Muʾminūn concerns sexual relations with another person: it contrasts lawful spouses with partners outside marriage, and never mentions the solitary act. The hadith about fasting recommends one help for young people’s desire and forbids nothing. When the texts are silent, the principle the jurists themselves taught applies, and the act remains permitted. Modern scholars have reached the same conclusion. Shehzad Saleem of al-Mawrid, the institute of Javed Ahmad Ghamidi, wrote in 1998 that “there is no explicit directive of the sharia which forbids masturbation.” Yusuf al-Qaradawi leaned toward Ahmad’s view for a person under strong desire.

The stronger view, then, is that masturbation is halal. Ibn Hazm’s dislike is good counsel about moderation.

When does it become a problem?

The Prophet ﷺ gave a rule that governs every permitted thing:

«لاَ ضَرَرَ وَلاَ ضِرَارَ»

“There is to be no harm, and no returning harm for harm.”

Sunan Ibn Majah 2340 (graded sahih by al-Albani)

Anything permitted becomes a concern when it harms: when it turns compulsive, crowds out sleep, work, prayer, or a spouse, or feeds on material that exploits other people. Pornography raises its own questions of consent and exploitation, separate from this ruling. If you feel you have lost control, a counselor can help, and seeking that help is part of caring for the self Allah entrusted to you (Is depression a sign of weak iman?).

What about guilt?

Many Muslims carry years of guilt over this, made worse by preachers who described it with exaggerated threats. Let that weight go. Desire is part of how Allah made human beings, and attraction itself carries no blame (Is having a crush haram?). Marriage remains the Quran’s great gift for love and intimacy, and getting to know a future spouse is halal (Is dating haram in Islam?). Until then, and for those who remain single by choice or circumstance (Is it haram not to get married or have children?), the law does not ask the impossible.

A few practical rulings remain. Ghusl is required afterward before the next prayer, and deliberately reaching climax during a fasting day breaks the fast (What breaks your fast in Ramadan?).

A closing word

The Quran describes Allah’s purpose in giving the law with great tenderness:

يُرِيدُ ٱللَّهُ أَن يُخَفِّفَ عَنكُمۡۚ وَخُلِقَ ٱلۡإِنسَٰنُ ضَعِيفٗا

“Allah wishes to lighten your burden, for the human being was created weak.”

Quran 4:28

Turn your attention from shame to the life Allah wants for you: prayer that steadies you, friendships that nourish you, and, if He wills, a marriage full of love.

And Allah knows best. والله أعلم

Frequently asked questions

Does masturbation break the fast in Ramadan?

Yes. The schools of law agree that deliberately reaching climax during the fasting day breaks the fast, and the day is made up after Ramadan. At night, between iftar and suhur, the ruling is the same as on any other day.

Do I need to make ghusl after masturbating?

Yes. Any emission of semen, for men or women, requires the full bath (ghusl) before the next prayer, as it does after intercourse.

Is masturbation haram for women?

The ruling is the same for women and men. Ibn Hazm stated explicitly that his judgment applies to both.

What does the Hanafi school say?

Hanafi jurists generally disliked it, and Ibn ʿAbidin (d. 1836) recorded that for a person who fears falling into zina, it is hoped there is no burden on them.

What is the Shia view?

Jaʿfari jurists generally forbid it, reasoning from the same verse in Sūrat al-Muʾminūn as the Maliki and Shafiʿi schools. The stronger view discussed in this answer rests on evidence shared by every school.

Related questions

Sources

  1. Ibn Hazm, al-Muḥallā bi-l-Āthār (chapter on istimnāʾ)
  2. Ibn ʿAbidin, Radd al-Muḥtār ʿalā al-Durr al-Mukhtār
  3. Ibn Taymiyya, Majmūʿ al-Fatāwā (on the two reports from Imam Ahmad)
  4. Yusuf al-Qaradawi, al-Ḥalāl wa-l-Ḥarām fī al-Islām (The Lawful and the Prohibited in Islam)
  5. Shehzad Saleem, "Masturbation," Monthly Renaissance (al-Mawrid), 1998

Image: Ottoman tile makers, Iznik tile panel, second half of the 16th century. Metropolitan Museum of Art, New York. CC0, via Wikimedia Commons.. Image credits