What Is Itikaf? Meaning, Rules & How to Do It in Ramadan

Itikaf means to be in isolation in a Masjid or at home with the intention of solely dedicating your time to the worship of Allah (SWT).

Itikaf (اِعْتِكَاف) is the Islamic act of secluding oneself inside a mosque for an uninterrupted period of worship — prayer, Quran recitation, dhikr, and supplication — devoting one’s time entirely to Allah. The practice is rooted in Surah Al-Baqarah 2:187 and the consistent example of the Prophet Muhammad (ﷺ), who observed itikaf in the last ten days of Ramadan every year until his death, as reported by Aisha in Sahih al-Bukhari 2026.

What looks like simply “sitting in the mosque” is actually a precise act of worship with its own conditions, intentions, and rules — including the question of when it begins, what breaks it, whether women may perform it at home, and what counts as a valid reason to step outside. This guide walks through the Arabic meaning, the Quranic and Hadith basis, the three recognised types, the rules for men and women across the four madhabs, and how working professionals and people in small apartment-mosque communities can still benefit from the practice today.

Quick answer: Itikaf is an Islamic spiritual retreat in which a Muslim secludes themselves in a mosque to devote uninterrupted time to worship — prayer, Quran recitation, dhikr, and supplication. It is most strongly recommended during the last ten days of Ramadan, following the practice of the Prophet Muhammad (ﷺ) as reported in Sahih al-Bukhari 2026 and Sahih Muslim 1172.

What does Itikaf mean?

The word itikaf (also written i’tikaf or ietikaaf) comes from the Arabic trilateral root ع-ك-ف (ʿ-k-f), which carries the meaning of clinging to something, persistently devoting oneself to a thing, or remaining attached. In its Islamic sense, the term refers specifically to a Muslim withdrawing into a mosque with the firm intention of dedicating their time exclusively to the worship of Allah.

The Quran uses the participle form of the same root twice in direct connection with this practice. In Surah Al-Baqarah 2:125, the phrase al-ʿākifīna (“those who meditate in it”) describes worshippers attached to the House of Allah. In Surah Al-Baqarah 2:187, the verse uses wa-antum ʿākifūna fi’l-masājid (“while you are in retreat in the mosques”) — which is the single most direct Quranic reference to itikaf as a recognised act of worship. The same linguistic root appears in classical Arabic to describe anyone who clings devotedly to a place or a purpose.

Practically, itikaf is more than just sitting in a mosque. It involves a deliberate intention (niyyah), a specific location (a congregational mosque for men, with conditions discussed below for women), and a commitment to keep one’s time and attention turned away from worldly distractions for the duration of the retreat. It is one of the most concentrated forms of personal worship in Islam, and the only one in which the place itself becomes part of the act.

Key takeaways:

  • Itikaf is rooted in Quran 2:187 and the Prophet’s (ﷺ) lifelong practice in the last ten days of Ramadan, narrated in Sahih al-Bukhari 2026 and Sahih Muslim 1172.
  • There are three recognised types: Wajib (vowed), Sunnah Muakkadah (last ten days of Ramadan), and Nafl (voluntary at any time).
  • Sunnah itikaf begins after Maghrib on the 20th of Ramadan and ends when the moon for Eid is sighted.
  • Men perform it in a congregational mosque; women’s options depend on the madhab — Hanafi permits home itikaf, the other three schools generally require a mosque.
  • It is only valid leaving the place of retreat for genuine need — bathroom, ghusl, Jumu’ah if your mosque lacks one, or food when nobody brings it.

Itikaf in the Quran and Sunnah

Itikaf is one of the few acts of worship explicitly named in the Quran. The clearest reference is the closing portion of Surah Al-Baqarah 2:187, addressing the rules of Ramadan fasting: “Do not be intimate with your spouses while you are in retreat in the mosques.” The verse takes the existence of itikaf as a given — it does not introduce the practice but regulates what happens during it — which tells us the Companions already understood and practised it before the verse was revealed.

The Sunnah of the Prophet Muhammad (ﷺ) provides the operational detail. Aisha narrated that “the Prophet (ﷺ) used to practise itikaf in the last ten days of Ramadan until he died, and then his wives used to practise itikaf after him” — reported in Sahih al-Bukhari 2026 and Sahih Muslim 1172, and considered muttafaq alayh (agreed upon between the two highest collections). Ibn Umar gave the same testimony in Sahih al-Bukhari 2025. In the year of his death, the Prophet (ﷺ) observed itikaf for twenty days instead of his usual ten, as reported in Sahih al-Bukhari 2044, which is why some scholars treat that final practice as the upper limit of an exemplary itikaf.

Sunan Abi Dawud 2473 — graded Hasan Sahih by al-Albani — adds the practical contours: the one in itikaf does not visit the sick, does not attend funerals, does not touch their spouse with desire, and does not leave the mosque except for genuine need. The same hadith mentions that the original sunnah of itikaf included fasting and that it was conducted in a congregational mosque — points where the four madhabs later took slightly different positions (the Hanafi school treats both as required; the Shafi’i and Hanbali schools treat fasting as recommended but not required for a valid itikaf).

The three types of Itikaf

Classical fiqh recognises three distinct categories of itikaf, each with a different ruling and a different starting point. Knowing which type you intend determines how strict the rules are and what your obligations look like if you have to break the retreat early.

1. Wajib Itikaf (obligatory by vow)

This is itikaf that becomes obligatory because a person made a nadhr (vow) to Allah to perform it. The anchor for this category is Sahih al-Bukhari 2032, where Umar ibn al-Khattab said to the Prophet (ﷺ): “I vowed in the pre-Islamic period to stay in itikaf for one night in al-Masjid al-Haram,” and the Prophet (ﷺ) replied: “Fulfil your vow.” A vowed itikaf must be completed exactly as vowed, in the location vowed if specified, and breaking it without a valid excuse requires qada (making it up).

2. Sunnah Muakkadah (strongly emphasised Sunnah)

This is itikaf performed during the last ten days of Ramadan. It is a sunnah muakkadah ʿalā al-kifāyah in the Hanafi school — a strongly emphasised communal Sunnah, meaning if some members of the community observe it, the rest are excused from the obligation, but if nobody does, the whole community has missed a confirmed Sunnah. The Prophet (ﷺ) never abandoned this practice in any year of his post-Hijra life, and Aisha and the Mothers of the Believers continued it after him. This is the type most Muslims mean when they say “I’m doing itikaf this year.”

3. Nafl Itikaf (voluntary)

This is voluntary itikaf performed at any time of the year, for any length of time. The Hanafi school sets a minimum of one full day with fasting; the Shafi’i and Hanbali schools accept even a single moment of intentional retreat in the mosque as a valid Nafl itikaf, as long as the intention is made. This is the form most accessible to working professionals — see the Modern Itikaf section below for practical patterns.

When does Itikaf start in Ramadan?

The Sunnah itikaf of the last ten days of Ramadan begins after Maghrib on the 20th of Ramadan — that is, at sunset on the night that introduces the 21st — and ends when the moon for Eid al-Fitr is sighted on the night of the 30th (or the night the 29th is confirmed as the last day). The whole window covers ten complete nights and the days that follow them. In practice, the worshipper enters the mosque before Maghrib on the 20th and exits after Maghrib on the night of Eid.

There is a famous exception in the Sunnah: in one year the Prophet (ﷺ) entered itikaf after Fajr prayer rather than after Maghrib, on the morning of the 20th. Sahih Muslim 1173 reports the incident where his wives pitched tents in the mosque to join him, prompting him to postpone his itikaf to the month of Shawwal that year. Most scholars treat the standard practice as “after Maghrib on the 20th” while accepting that entering earlier — at Fajr of the 20th — is also permissible and reflected in some narrations.

Why specifically the last ten nights? Because they contain Laylat al-Qadr — the Night of Decree — described in Surah Al-Qadr 97:3 as “better than a thousand months.” Abu Sa’id al-Khudri’s narration in Sahih al-Bukhari 2027 explains that the Prophet (ﷺ) initially performed itikaf in the middle ten days seeking Laylat al-Qadr, then was informed it was in the last ten, and from then on devoted those last ten exclusively to itikaf. The two acts of worship are intertwined: itikaf is the structured way the Sunnah preserves and protects the search for Laylat al-Qadr.

How to perform Itikaf step by step

A valid itikaf rests on four pillars: the right person (Muslim, sane, in a state of ritual purity from major hadath), the right intention (niyyah), the right place (a congregational mosque for men), and the right time (the duration intended). Get those four right and the rest is a question of what you fill the hours with.

Make the intention before entering

Niyyah is made in the heart before stepping into the mosque. It does not need to be spoken aloud. A simple internal “I intend itikaf in this mosque for the sake of Allah, for [duration]” is sufficient. The intention should specify which of the three types you are performing — vowed, Sunnah Muakkadah of Ramadan, or Nafl — because the rules and the consequences of breaking it differ between them.

What to do during itikaf

Itikaf is filled with acts of worship oriented toward Allah, not idle waiting. The most-recommended occupations are:

  • Performing the five obligatory prayers in congregation, plus voluntary nawafil and tahajjud.
  • Reciting the Quran, ideally completing it at least once across the ten days.
  • Making dhikr — repeating SubhanAllah, Alhamdulillah, Allahu Akbar, La ilaha illa Allah, and reciting durood on the Prophet (ﷺ).
  • Making sincere du’a, particularly the famous Laylat al-Qadr du’a taught to Aisha: “Allahumma innaka ʿafuwwun tuhibbu al-ʿafwa fa-ʿfu ʿannī” — “O Allah, You are Most Forgiving, You love forgiveness, so forgive me.”
  • Studying Islamic knowledge — reading tafsir, hadith collections, or works of fiqh.
  • Repenting (tawbah) and reflecting on one’s relationship with Allah.

What breaks itikaf

Itikaf is invalidated by:

  • Leaving the mosque without a valid need, even briefly.
  • Marital intimacy — explicitly forbidden by Quran 2:187.
  • Onset of menstruation or post-natal bleeding for women already in itikaf (it ends; she resumes after purity if she wishes).
  • Loss of sanity, intoxication, or apostasy.
  • Engaging in commerce inside the mosque (buying and selling).

Valid reasons to leave the mosque

Sahih al-Bukhari 2029 records Aisha’s report that “the mu’takif should not enter his house except for a need.” The Companions and the scholars after them detailed those needs as:

  • Using the bathroom or performing wudu/ghusl when the mosque lacks facilities.
  • Going to a different mosque for Jumu’ah prayer if the mosque of itikaf does not hold it.
  • Going to eat or drink at home if nobody is bringing food and there is no other option.
  • Calling the adhan if you are the appointed muezzin and the call must be made from outside.
  • Attending a funeral prayer or visiting a sick person only if the intention was made at the time of entering itikaf (otherwise the retreat is broken).

Itikaf for women: at home or in the mosque?

Women may perform itikaf, and the Prophet’s (ﷺ) wives performed it during his lifetime and after his death. The disagreement among the four madhabs is not whether women may do itikaf — it is whether they may do it at home.

MadhabPosition on women’s itikaf
HanafiA woman may perform itikaf in the prayer area of her home — in a designated spot she would normally use for prayer. Going to the mosque is not preferred for her, especially in our times.
MalikiItikaf for women is valid only in a mosque, and she requires permission from her husband, who has the right to revoke it.
Shafi’iItikaf must be in a mosque for both men and women. A woman’s itikaf at home is not valid in this school.
HanbaliItikaf is valid only in a congregational mosque (one in which the five daily prayers are held), for both men and women, with husband’s consent.

For Sunnah itikaf (last ten days of Ramadan), the husband’s permission is required across all schools because his marital rights are affected for the duration. For Nafl itikaf, the husband’s consent is similarly required if the time would otherwise be owed to him. A Wajib itikaf (vowed) does not require consent in the Maliki view if the vow predates the marriage, though contemporary scholars recommend mutual agreement regardless.

Practical guidance for women observing itikaf at home (Hanafi practice): designate a clean, quiet corner you will not leave except for genuine need; keep a copy of the Quran, a prayer mat, and water within reach; arrange childcare in advance where possible. The Hanafi position allows brief interruptions for genuine domestic necessities — checking on a small child, fetching food — without invalidating the retreat, provided the interruption is functional and not recreational. Resuming the niyyah after the interruption restores the state of itikaf.

Modern itikaf: phones, work, and small masjids

The hadith literature on itikaf assumes a 7th-century context — open congregational mosques with attached living quarters, no phones, no office jobs. Most contemporary Muslims face a different set of constraints, and several practical questions come up every Ramadan.

Can I use my phone during itikaf?

A useful rubric: ask whether the phone is being used for the worship or as an escape from it. Quran apps, tafsir lectures, hadith collections, and audio recitations clearly support the spirit of itikaf. Brief calls to family members about logistics — childcare handoffs, the family’s iftar — fit within the “genuine need” exemption that already covers physical exits. What does not fit: social media scrolling, news, work emails, video games, and entertainment streaming. The conservative practice is to leave the phone in airplane mode and use it only as a Quran or dhikr counter; the more accommodating practice is to allow it for clearly worship-supporting content. Both are defensible. The act of itikaf is meant to reduce the surface area of distraction, not preserve it through a different medium.

What if I can’t take ten days off work?

The full ten-day itikaf is not the only Sunnah on offer. The Shafi’i and Hanbali schools accept a Nafl itikaf of any length — even a single afternoon between Asr and Maghrib, with the intention made on entering the mosque. A common pattern for working professionals: anchor the Sunnah Muakkadah of the final ten days by performing the final three days fully (the odd nights of the 27th, 29th, and the Eid moon) and supplement with Nafl itikaf in the afternoons or evenings of the earlier days. Each entry with renewed intention counts. The reward is not all-or-nothing.

Small apartment-mosques and shared spaces

In dense urban areas, many mosques are converted apartments with shared bathrooms, a single wudu area, and limited sleeping space. The fiqh-compliant adjustments: confirm with the imam in advance whether overnight stays are permitted; bring your own bedding to reduce burden on the masjid; respect quiet hours so other mu’takifin can pray and sleep; and accept that ghusl facilities may require a short walk to a member’s home, which falls under “valid need” exits as long as you return without delay. Contributing toward the mosque’s iftar costs is recommended — Sahih al-Bukhari 2026 implies the worshippers in itikaf were fed by the community.

Frequently asked questions

What is itikaf in simple words?

Itikaf is a spiritual retreat where a Muslim stays inside a mosque for a set period — usually the last ten days of Ramadan — to focus entirely on worship: prayer, Quran recitation, dhikr, and du’a. The person leaves only for genuine needs like the bathroom or ghusl. It follows the practice of the Prophet Muhammad (ﷺ) recorded in Sahih al-Bukhari 2026.

What breaks itikaf?

Itikaf is invalidated by leaving the mosque without a valid need, marital intimacy (Quran 2:187 explicitly forbids it), onset of menstruation or post-natal bleeding, loss of sanity, intoxication, apostasy, or buying and selling inside the mosque. Going out for a need and staying longer than necessary also breaks it. Valid exits include the bathroom, ghusl, Jumu’ah at another mosque, and unavoidable food collection.

When does itikaf start in Ramadan?

Sunnah itikaf of the last ten days starts after Maghrib on the 20th of Ramadan (entering the night of the 21st) and ends when the moon for Eid al-Fitr is sighted. In practice, the mu’takif enters the mosque before Maghrib on the 20th and exits after Maghrib on the night of Eid. The Prophet (ﷺ) maintained this practice every year as reported in Sahih al-Bukhari 2025 and Sahih Muslim 1172.

Can women do itikaf at home?

According to the Hanafi school, yes — a woman may perform itikaf in the spot in her home she designates for prayer. The Maliki, Shafi’i, and Hanbali schools require a mosque for both men and women. Practically, most contemporary scholars advise women in the Hanafi tradition to perform itikaf at home, while women in the other three madhabs go to mosques that provide separate women’s facilities and accommodation.

What is the minimum duration of itikaf?

The four madhabs disagree. The Hanafi and Maliki schools set a minimum of one full day, with fasting required. The Shafi’i and Hanbali schools accept any length — even a single moment of intentional retreat in the mosque with the niyyah of itikaf is valid as a Nafl. For the strongly emphasised Sunnah of Ramadan, the minimum practical duration is the full last ten days, following the Prophet’s (ﷺ) example in Sahih al-Bukhari 2026.

Can itikaf be done outside Ramadan?

Yes. Nafl itikaf is valid at any time of the year, for any length. There is a notable Prophetic precedent: when the Prophet (ﷺ) missed his Ramadan itikaf one year because of his wives’ tents (Sahih Muslim 1173), he made it up in the month of Shawwal. Some scholars treat that as evidence that itikaf in Shawwal carries a special reward as the immediate make-up for missed Ramadan retreat. Outside Ramadan, the practical pattern is shorter Nafl itikafs — a single day, a Friday afternoon, a night — to maintain the connection.