← Muhasaba

Seasonal practice

Itikaf: Meaning, Rules & How to Observe It in Ramadan

For ten nights every Ramadan, the Prophet ﷺ left his home, his family, and his business behind, and did not leave the mosque again until the month ended.

By Zaman Ishtiyaq · October 2026

Add Muhasaba as a preferred source on Google

8 min read

In this guide
  1. 01Where itikaf comes from
  2. 02The rules of itikaf
  3. 03How long does a voluntary itikaf need to be?
  4. 04Itikaf and the search for Laylatul Qadr
  5. 05How to prepare for itikaf
  6. 06Itikaf, khalwa, and the wider tradition of retreat
  7. 07Begin planning now
  8. 08Build the muhasaba habit itikaf leaves behind, free on iOS.

Definition

Itikaf (Arabic: اعتكاف, i'tikaf) is the Sunnah practice of secluding yourself inside a mosque for a sustained stretch of time, set apart entirely for worship, most often observed in the last ten nights of Ramadan. The word comes from an Arabic root meaning to cling to or devote oneself to something, and in Islamic law it names a specific intention-bound stay in a masjid during which ordinary business is set aside for dhikr, Quran, and dua. The Prophet ﷺ performed it every Ramadan he lived in Madinah, and in the year he died he observed it twice over (Sahih al-Bukhari 2025). Muhasaba is also an iOS app for Islamic journaling built around this same pull toward structured self-reflection, though itikaf itself is a physical retreat inside a mosque rather than a writing practice. Scholars disagree on whether any form of it is obligatory, but they agree it is at minimum a strongly confirmed Sunnah.

Ibn Umar (رضي الله عنه) reported that the Messenger of Allah ﷺ used to observe itikaf in the last ten nights of Ramadan (Sahih al-Bukhari 2025). It was not an occasional practice. Aisha (رضي الله عنها) said he kept it up every year until he passed away, and his wives continued the practice after him, a detail scholars cite as direct evidence that itikaf is open to women as well as men.

For most Muslims, the last ten nights of Ramadan already feel different from the rest of the month: longer taraweeh, extra Quran, a general sense that something important is closing in. Itikaf takes that instinct and gives it a formal shape. Instead of simply feeling more devoted during those nights, the person observing itikaf steps fully out of ordinary life and into the mosque, with a stated intention and a defined boundary around the time. It turns a feeling into a structure, and the structure is what the fiqh literature actually regulates.

Where itikaf comes from

The clearest Quranic reference to itikaf sits inside the verse on the Ramadan fast itself. Surah Al-Baqarah 2:187 permits spouses to be intimate with each other during the nights of Ramadan, then adds a specific exception: "but do not approach them while you are in itikaf in the mosques." The verse assumes the reader already knows what itikaf is, a sign that the practice predates the Quran's own revelation and was simply carried into Islamic law with its name intact.

"The Prophet ﷺ used to observe itikaf in the last ten nights of Ramadan."

— Sahih al-Bukhari 2025 (Ibn Umar)

One narration adds a striking detail about commitment. In the year the Prophet ﷺ died, he observed itikaf twice over rather than once, a doubling that several scholars read as a final, deliberate intensification, as if he knew the season of his life was closing and gave it everything the practice could hold.

The rules of itikaf

01

Timing

The complete Sunnah itikaf begins before sunset on the twentieth day of Ramadan fasting and continues until the Shawwal moon is sighted, covering the final ten nights of the month. Several scholars tie this window directly to the search for Laylatul Qadr, since staying through all ten nights removes any guesswork about which night it falls on.

02

Location

Itikaf is performed inside a mosque, generally one where the five daily prayers are held in congregation, so the person does not need to leave for Fajr, Zuhr, Asr, Maghrib, or Isha. For women, most scholars direct the retreat toward a dedicated prayer space within the home rather than the congregational mosque, since congregational prayer is not obligatory on her the way it is on men, though some permit the mosque itself with a husband or guardian's knowledge.

03

Intention

Like every act of worship in Islam, itikaf requires niyyah: a clear intention, made in the heart before entering, that this stay in the mosque is itikaf and not an ordinary visit. The intention does not need to be spoken aloud. It needs to be definite, formed before the retreat begins rather than decided on halfway through.

04

Fasting

The Hanafi school treats fasting as a condition of a valid Sunnah itikaf in the last ten nights, binding the retreat to the Ramadan fast itself. Other schools hold that fasting is not a strict precondition, even though anyone performing the classical ten-night itikaf will already be fasting regardless, since it falls inside Ramadan either way.

05

What breaks it

Leaving the mosque without genuine necessity breaks itikaf, though using the washroom, performing ghusl, and eating when food cannot be brought in are all accepted exceptions. Sexual intercourse ends it outright, which is the exact exception Surah Al-Baqarah 2:187 carves out for those "in itikaf in the mosques." A woman who begins a complete itikaf and then menstruates must end her retreat, since major ritual impurity cannot coexist with it.

How long does a voluntary itikaf need to be?

Outside the full ten-night retreat, the schools of fiqh genuinely disagree on how little time still counts as itikaf. Hanafi scholars generally require at least a day for it to be recognised as nafl itikaf proper, though simply standing in the mosque with the intention is still rewarded as general worship. Maliki jurists typically ask for a minimum of a full day and night together. Shafi'i scholars take the most expansive position: a brief pause with a clear intention, even a few moments spent sitting in the mosque between two prayers, can fulfil a valid nafl itikaf in their view, since no minimum duration is fixed in the primary texts. Hanbali scholars lean toward a similar leniency, recommending at least a short, deliberate stay without insisting on a fixed length.

The practical takeaway survives the disagreement intact. Someone who cannot commit to ten nights has not been shut out of the practice. Sitting in the mosque after a prayer, with the clear intention of observing itikaf for however long you remain, is a real and recognised version of it under at least one established school, even if the full reward described in the Ramadan hadith belongs to the complete ten-night form. The disagreement itself is worth knowing, if only so a short itikaf never feels like a consolation prize rather than a legitimate act of worship in its own right.

Itikaf and the search for Laylatul Qadr

The Prophet ﷺ told his companions that he had been shown the exact night of Laylatul Qadr, then forgot its date, and instructed them to seek it among the odd nights of the last ten. Itikaf is the most direct response to that instruction available to an ordinary Muslim: ten consecutive nights of worship inside the mosque removes the need to guess which night to prioritise, because all of them are already covered.

This is also why itikaf sits downstream of the taraweeh and tahajjud prayers that fill Ramadan nights. A person already praying taraweeh and staying up for qiyam is, in a sense, rehearsing the same posture itikaf asks for on a larger scale: setting the normal rhythm of the day aside so that worship has the room it needs.

How to prepare for itikaf

Settle your responsibilities beforehand

Work, childcare, and household matters need to be arranged before the twentieth night, not during it. The point of itikaf is that these things are genuinely set aside, not managed remotely from inside the mosque.

Bring less than you think you need

A mat, a change of clothes, a Mushaf, and basic toiletries cover most of it. Itikaf is not a camping trip. Simplicity keeps attention on worship rather than logistics.

Give the days structure

Ten unstructured nights can drift. Many people who observe itikaf plan a rotation of Quran recitation, dhikr, dua, and rest, so energy lasts the full ten nights instead of burning out on the first three.

Use the quiet for honest muhasaba

Removed from the noise of ordinary life, itikaf creates exactly the conditions muhasaba al-nafs needs: no distractions to hide behind, and ten nights long enough for a real accounting of the year rather than a rushed one.

Agree on check-ins with family beforehand

Decide in advance how, and how often, you will communicate with family outside the mosque, rather than figuring it out mid-retreat. A short daily message is enough for most households and keeps the retreat itself free of the back-and-forth it is meant to escape.

Remember it is not the only option

Not everyone can take ten consecutive nights away from work or caregiving, and the tradition does not ask the impossible of anyone. A single night of itikaf, or even an hour of dedicated dhikr and dua after Isha, carries real weight when the full retreat is not realistic this year.

Itikaf, khalwa, and the wider tradition of retreat

Itikaf belongs to a broader Islamic vocabulary of withdrawal that includes khalwa, the more general practice of intentional solitude for spiritual purposes. Every itikaf is a form of khalwa, since both involve stepping away from ordinary life with a clear intention toward Allah. But itikaf is the institutionalised version: it has a fixed location, the mosque; a fixed season, the last third of Ramadan; and specific rules for what ends it. Not every khalwa is itikaf, since khalwa can happen anywhere, for any reason tied to worship, at any point in the year.

The relationship matters because it explains why itikaf feels different from an ordinary long night at the mosque. The boundary around it (the mosque walls, the ten-night commitment, the explicit intention made before entering) is what turns ordinary worship into a structured retreat with its own name, its own evidence, and its own reward.

Begin planning now

Ramadan 1448 is still months away, but the logistics of a ten-night retreat (clearing your calendar, speaking to your mosque, arranging coverage at work or home) rarely come together if they are left until the twentieth night arrives. Start the conversation with your family or your mosque committee early, and treat the planning itself as part of the preparation for Ramadan rather than an afterthought bolted onto the last third of the month.

The Prophet ﷺ gave this practice every Ramadan of his settled life in Madinah, and doubled it in his last. That is not a small detail to read past.

Carry the reflection home

Build the muhasaba habit itikaf leaves behind, free on iOS.

The Muhasaba app guides a five-minute nightly reflection, written or spoken, with an ayah chosen for your night and a dhikr to close it, so the quiet itikaf builds does not have to end when Ramadan does.

Download on the App Store

New to muhasaba? Learn what muhasaba al-nafs means →

Discuss on X