Skip to main content
⚖️ Halal & Haram

Is masturbation haram (forbidden) in Islam?

Answered with evidence from the Quran and authentic Hadith

Quick Answer

The majority of scholars consider masturbation haram based on Quran 23:5-7, which limits sexual relations to marriage. Some Hanbali scholars permitted it only as a last resort to prevent a greater sin (like zina). All scholars agree that lowering the gaze, fasting, and early marriage are the recommended solutions.

Detailed Answer

The majority of scholars from the four madhabs consider masturbation to be haram (forbidden). Their primary evidence is the verse in Surah Al-Mu'minun where Allah praises the believers "who guard their private parts except from their wives or those whom their right hands possess" — and then says "whoever seeks beyond that, then those are the transgressors." Scholars argue that masturbation falls under "seeking beyond that."

A minority of scholars — particularly some from the Hanbali school, including Imam Ahmad in one narration — permitted it only in cases of extreme necessity: when a person genuinely fears falling into zina (fornication) and has no ability to marry. Even in this view, it is considered a lesser evil chosen to avoid a greater sin, not something permissible in itself.

The Prophet (peace be upon him) advised young men who cannot afford marriage to fast, as fasting reduces desire. This is the primary Islamic remedy for managing sexual desire outside of marriage. Other recommended practices include: lowering the gaze, avoiding situations that arouse desire, keeping busy with worship and beneficial activities, and seeking marriage as soon as possible.

If someone struggles with this habit, they should not despair of Allah's mercy. Repentance (tawbah) is always open, and Allah forgives all sins for those who sincerely turn to Him. The key is to keep trying, keep repenting, and take practical steps to reduce temptation.

Evidence from Quran & Hadith

QuranQuran 23:5-7

وَالَّذِينَ هُمْ لِفُرُوجِهِمْ حَافِظُونَ ۝ إِلَّا عَلَىٰ أَزْوَاجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَانُهُمْ فَإِنَّهُمْ غَيْرُ مَلُومِينَ ۝ فَمَنِ ابْتَغَىٰ وَرَاءَ ذَٰلِكَ فَأُولَٰئِكَ هُمُ الْعَادُونَ

Walladheena hum li-furoojihim hafizoon. Illa 'ala azwajihim aw ma malakat aymanuhum fa-innahum ghayru maloomeen. Famanib-tagha wara'a dhalika fa-ula'ika humul-'adoon.

And those who guard their private parts, except from their wives or those whom their right hands possess — for they are not to be blamed. But whoever seeks beyond that, then those are the transgressors.

HadithSahih Bukhari 5066, Sahih Muslim 1400

The Prophet (peace be upon him) said: "O young men, whoever among you can afford to get married, let him do so, for it is more effective in lowering the gaze and guarding chastity. And whoever cannot afford it, let him fast, for it will be a shield for him."

Key Points

  • The majority of scholars from the four madhabs consider masturbation to be haram (forbidden).
  • A minority of scholars — particularly some from the Hanbali school, including Imam Ahmad in one narration — permitted it only in cases of extreme necessity: when a person genuinely fears falling into zina (fornication) and has no ability to marry.
  • The Prophet (peace be upon him) advised young men who cannot afford marriage to fast, as fasting reduces desire.
  • If someone struggles with this habit, they should not despair of Allah's mercy.

Related Questions

Explore Other Topics

Continue Learning

Note: This answer is based on the Quran and authentic Hadith for general guidance. For detailed rulings on your specific situation, please consult a qualified Islamic scholar. May Allah guide us all to the truth.

Listen to the Quran →