Performing the worship of I’tikaf demands purity of intention and physical discipline. A person who has anchored their heart to stay in the mosque must recognize the boundaries of the Sharia so that their worship is not ruined halfway through. In the literature of Shafi’i Fiqh, scholars have formulated strict guidelines regarding the invalidators of I’tikaf and the specific rulings on leaving the mosque while the I’tikaf is ongoing.
This article refers directly to the authoritative explanations by Shaykh al-Islam Zakariyyā al-Anṣārī in the classical text Asnā al-Maṭālib Sharḥ Rawḍ al-Ṭālib. The legal details below serve as a vital guide for every mu’takif (the person performing I’tikaf) to maintain the validity and continuity (tatabbu’) of their worship, complementing the foundational knowledge found in our Complete Guide to the Fiqh of I’tikaf According to the Shafi’i School.
Primary Invalidators of I’tikaf (Mubtilat)

The invalidation of an act of worship occurs when a person violates a fundamental prohibition established by the Sharia. There are several crucial actions that absolutely nullify the validity of I’tikaf.
1. Sexual Intercourse (Jima’) and the Intentional Emission of Semen
The first action that invalidates I’tikaf is sexual intercourse (jima’). The Sharia equates the nullification of I’tikaf due to intercourse with the nullification of fasting. Shaykh al-Islam Zakariyyā al-Anṣārī explains:
قوله: (ويفسده) أي الاعتكاف (من الجماع ما يفسد الصوم) منه وهو ما يقع مع تذكر الاعتكاف والعلم بتحريمه والاختيار… (فيحرم) بسببه الجماع بهذه الشروط لقوله تعالى {ولا تباشروهن وأنتم عاكفون في المساجد} [البقرة: ١٨٧]
Meaning: “And what invalidates it (I’tikaf) from intercourse is exactly what invalidates fasting… which is what occurs while remembering one is in I’tikaf, knowing its prohibition, and doing it by choice… Thus, intercourse is forbidden under these conditions based on the word of Allah the Exalted: ‘And do not have relations with them as long as you are staying for I’tikaf in the mosques’ (QS. Al-Baqarah: 187).”
Besides intercourse, actions that provoke lust also have fatal consequences for the worship if they lead to the emission of semen (inzal).
ويحرم (به التقبيل واللمس بشهوة)… (فإذا أنزل معهما أفسده كالاستمناء)
Meaning: “It is forbidden during it (I’tikaf) to kiss and touch with desire… If he emits semen along with these two actions, it invalidates it, just like the ruling on masturbation (intentional emission).”
2. Apostasy, Intoxication, and Insanity
The validity of any Islamic worship heavily depends on intellect and faith, as elaborated in the Conditions and Pillars of I’tikaf in Detail. If a person leaves Islam (apostasy) or loses consciousness due to committing a sin (intoxication), their I’tikaf is severed instantly.
قوله: (متى ارتد) المعتكف (أو سكر) بمحرم (بطل اعتكافه) زمن الردة والسكر وإن لم يخرج من المسجد لعدم أهليته للعبادة
Meaning: “Whenever the mu’takif apostatizes or becomes intoxicated by something forbidden, his I’tikaf is nullified during the period of apostasy and intoxication, even if he does not leave the mosque, because he has lost his eligibility (ahliyyah) for worship.”
The same ruling applies to a person who suddenly loses their sanity (junun). Insanity negates I’tikaf. However, this differs from someone who simply faints (ighma’); the duration of their fainting is still counted as I’tikaf, similar to a sleeping person, provided they are not removed from the mosque.
Rulings on Leaving the Mosque During I’tikaf and the Rule of Continuity (Tatabbu’)

A frequently asked technical question concerns the ruling on leaving the mosque during I’tikaf. In I’tikaf, there is a concept called tatabbu’ (continuity/consecutiveness). Leaving the boundaries of the mosque without a valid Sharia excuse (‘udhr) will break this continuity.
قوله: (فإن خرج بكل البدن من المسجد… بلا عذر) من الأعذار الآتية (بطل) التتابع
Meaning: “If he leaves the mosque with his entire body… without an excuse from the upcoming valid excuses, the continuity (tatabbu’) is nullified.”
However, Islamic law is always built upon ease. There are specific excuses that permit a mu’takif to step outside the mosque’s boundaries without ruining their worship.
1. Leaving to Answer the Call of Nature and for an Obligatory Bath (Ghusl)

Basic human biological needs cannot be suppressed. Leaving the mosque to urinate or defecate is a perfectly valid excuse.
قوله: (ولا يبطل) التتابع (بالخروج لقضاء الحاجة) إذ لا بد منه (ولو كثر) خروجه لقضائها
Meaning: “The continuity is not invalidated by leaving to fulfill a need (relieving oneself), as it is unavoidable, even if he leaves frequently to fulfill it.”
Furthermore, Shafi’i Fiqh heavily guards a person’s dignity (muru’ah). Regarding the location of relieving oneself, a mu’takif is permitted to return to their own home. They are not obligated to use the closest available facility (such as a poorly maintained mosque toilet or borrowing a neighbor’s restroom) if doing so would cause hardship or lower their dignity.
قوله: (ولا يكلف) في قضاء الحاجة وما بعده (غير داره) كسقاية المسجد ودار صديق له بجوار المسجد لما فيه من المشقة وخرم المروءة
Meaning: “And he is not burdened (obligated) when relieving himself to go anywhere other than his own home, such as the mosque’s water area or the house of a friend adjacent to the mosque, because doing so contains hardship (masyaqqah) and breaches one’s dignity (muru’ah).”
However, if their house is unreasonably far away (tafahush), and there is another decent place nearby, they may not force themselves to go all the way home, as that would consume too much worship time on the road.
It is also permissible to leave to perform a major ritual bath (ghusl) due to a wet dream (ihtilam). In fact, it is recommended to do this outside so that the cleanliness and purity of the mosque are protected from major ritual impurity.
2. Leaving Due to Severe Illness Requiring Care
The next excuse that legalizes leaving the mosque during I’tikaf is a debilitating illness.
قوله: (ومن خرج لمرض محوج) إلى الخروج بأن شق معه المقام لحاجته إلى فراش وخادم وتردد طبيب أو خاف منه تلويث المسجد لم ينقطع التتابع
Meaning: “Whoever leaves due to an illness that compels him to leave—meaning he finds it severely difficult to stay because he needs a bed, a nurse, frequent doctor visits, or fears dirtying the mosque—his continuity is not severed.”
Minor ailments like a simple headache or mild fever do not fall under this concession. The concession is strictly given for illnesses that, medically and customarily, require the patient to rest completely outside the mosque environment. This also aligns with the principle of preserving the sanctity of the House of Allah, as discussed in The Etiquette of I’tikaf: Eating, Sleeping, and Makruh Acts in the Mosque.
Summary Table: Invalidators and Excuses for Leaving the Mosque
| Condition / Action | Legal Status in Shafi’i I’tikaf | Consequence |
| Intercourse & Intentional Emission | Absolutely Invalidates I’tikaf | Worship is ruined; must be repeated if vowed (nadhr). |
| Apostasy, Intoxication, Insanity | Absolutely Invalidates I’tikaf | Loss of eligibility (ahliyyah) to worship. |
| Leaving Mosque Without Excuse | Invalidates Continuity (Tatabbu’) | The consecutive chain of the I’tikaf is broken. |
| Leaving to Relieve Oneself | Valid Sharia Excuse (Permitted) | I’tikaf remains valid; may go home to preserve dignity. |
| Leaving for Obligatory Bath | Valid Sharia Excuse (Permitted) | I’tikaf remains valid; recommended to return promptly. |
| Severe Illness Requiring Care | Valid Sharia Excuse (Permitted) | I’tikaf remains valid; continuity is not broken. |
FAQ: Jurisprudence of the Invalidators of I’tikaf
Does physical touch between husband and wife invalidate I’tikaf?
If the touch is accompanied by lust and results in the emission of semen (inzal), the I’tikaf is invalidated. If no emission occurs, the act is still forbidden (haram) inside the mosque, though scholars have detailed nuances regarding whether it technically breaks the I’tikaf itself.
What is the ruling on leaving the mosque during I’tikaf to use a neighbor’s toilet because the mosque’s is full?
This is permissible. However, Shafi’i Fiqh dictates that you have the right to return to your own home to preserve your dignity (muru’ah), so you do not feel awkward or indebted by using someone else’s home, provided the distance to your house is reasonable.
If someone has a wet dream during the day while in I’tikaf, are their fast and I’tikaf invalidated?
A wet dream (ihtilam) occurs outside human conscious control. It does not invalidate I’tikaf, nor does it ruin the fast. The person is only required to leave the mosque promptly to perform the obligatory major bath (ghusl janabah), and then return to continue their worship.
May this detailed explanation from the Shafi’i school provide a firm foundation of knowledge for readers seeking to preserve the beautiful Sunnah of I’tikaf.
Reference
al-Anṣārī, Zakariyā. Asnā al-Maṭālib fī Sharḥ Rawḍ al-Ṭālib. With the marginalia (hashiyah) of Aḥmad al-Ramlī. Edited by Muḥammad az-Zuhrī al-Ghamrāwī. Cairo: al-Maṭbaʿah al-Maymānīyah, 1313 AH. Reprinted by Dār al-Kitāb al-Islāmī.




