Is it permissible to masturbate out of necessity, given three conditions (without imagination, in a confined space, and to دفع الشهوة لا استجلابها [repel lust, not invite it]), especially when one is unable to marry or fast due to studies and age (16 years)?
Masturbation is forbidden by the majority of scholars, though some have permitted it out of necessity or fear of committing zina (unlawful sexual intercourse).
To manage lust for those unable to marry or fast: Distract your mind, avoid triggers of lust, fill your time with beneficial activities, stay away from visual and dietary stimulants, and frequently supplicate to Allah for chastity.
Physical exercise and exhausting the body through social services consume energy.
Cooperating in an academic or social program with righteous individuals is motivating for continuation and competition.
Strive to humbly supplicate to Allah to avert evil and indecency, and emulate the Prophet of Allah, Yusuf (Joseph), peace be upon him.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/135303