deen2u

deen2u — your one-stop center for Islamic resources: the Holy Quran, Hadith, practices, stories of the Prophets, Q&A, and how to practice Islam.

Iʿtikāf — the retreat of the last ten nights

A withdrawal into the masjid to devote oneself wholly to Allah in the closing nights of Ramadan — in pursuit of the Night better than a thousand months.

Arabicالاعتكاف
Its timeLast ten nights of Ramadan
Its aimSeeking Laylat al-Qadr
Its rulingConfirmed sunnah (muʾakkadah)

Iʿtikāf is a seclusion in the masjid, cutting off the world's business to devote oneself to Allah — remembrance, prayer, Quran and duʿāʾ. It is above all the practice of the last ten nights of Ramadan, when the believer withdraws in search of Laylat al-Qadr. The Prophet ﷺ kept it every year to the end of his life.

What iʿtikāf is

Linguistically iʿtikāf means to keep constant to a thing, to cleave to it. In the Sharīʿah it is to remain in the masjid, with the intention of worship, cutting off ordinary affairs. Allah names it directly:

Quran · al-Baqarah 2:187

وَلَا تُبَاشِرُوهُنَّ وَأَنتُمْ عَاكِفُونَ فِي الْمَسَاجِدِ

"And do not have relations with them while you are in iʿtikāf in the mosques."

Sūrat al-Baqarah 2:187

The āyah settles two matters at once: iʿtikāf takes place in the masjid, and intimacy with one's spouse is forbidden while in it.

The practice of the Prophet ﷺ

It was a fixed sunnah of the last ten nights, unbroken to the end of his life:

Hadith · Ṣaḥīḥṣaḥīḥ

ʿĀʾishah (raḍiya Allāhu ʿanhā) said: "The Prophet ﷺ used to practice I`tikaf in the last ten days of Ramadan till he died and then his wives used to practice I`tikaf after him."

al-Bukhārī 2026 · Muslim — site reader no. 2668 (Kitāb al-Iʿtikāf)

In the year he passed, he doubled it, observing iʿtikāf for twenty days (al-Bukhārī 2044) — a sign of striving harder as the end drew near. And the striving of these ten nights was of a special order:

Hadith · Ṣaḥīḥṣaḥīḥ

ʿĀʾishah said: "With the start of the last ten days of Ramadan, the Prophet ﷺ used to tighten his waist belt (i.e. work hard) and used to pray all the night, and used to keep his family awake for the prayers."

al-Bukhārī 2024 · Muslim — site reader no. 2671 (Kitāb al-Iʿtikāf)

Why the last ten — Laylat al-Qadr

The engine of iʿtikāf is the search for the Night of Decree, better than a thousand months (al-Qadr 97:3). The Prophet ﷺ directed the search to the odd nights of these ten:

Hadith · Ṣaḥīḥṣaḥīḥ

"Search for the Night of Qadr in the odd nights of the last ten days of Ramadan."

al-Bukhārī 2017

He himself explained that he first observed iʿtikāf in the first ten nights seeking it, then the middle ten, then was shown it was in the last ten (Muslim, Kitāb al-Ṣiyām — site reader no. 2655) — so the retreat and the night are bound together.

How iʿtikāf is kept: enter the masjid before Maghrib on the 21st night with intention; remain inside for worship; leave only for genuine need; break it only for what the Sharīʿah names; and end it at the sighting of Eid.

The retreat, step by step

The manner ʿĀʾishah described — practical, not burdensome.

1 · Enter
Before Maghrib, 21st night
Enter the masjid with the intention (niyyah) of iʿtikāf, before sunset of the night the ten begin.
2 · Remain
Stay within the masjid
Fill the time with ṣalāh, Quran, dhikr and duʿāʾ; sleeping and eating in the masjid are part of it.
3 · Leave only for need
Genuine necessity only
Stepping out for food, the toilet or ghusl is allowed; needless leaving nullifies it.
4 · End
At the sighting of Eid
The retreat closes when Ramadan ends — many leave to pray Eid; some hold it lasts till the Eid prayer.

Its place: iʿtikāf is a confirmed sunnah (sunnah muʾakkadah) in the last ten of Ramadan, not an obligation — it becomes binding only if one vows it. It is valid at other times too, but its home is these nights.

Its conditions & what breaks it

The scholars draw its rules from the āyah and the sunnah of the Prophet ﷺ:

Kept intact by

  • Being in a masjid, with intention — for men, a masjid where prayers are held in congregation.
  • Remaining inside; sleeping, eating and drinking there are part of the retreat.
  • Leaving briefly for a genuine need — toilet, food one cannot obtain inside, obligatory ghusl.
  • Occupying oneself with worship: Quran, ṣalāh, dhikr, duʿāʾ, seeking knowledge.

Broken or harmed by

  • Sexual relations — explicitly forbidden in the āyah (2:187) and nullifying.
  • Leaving the masjid without need, or for long, deliberately.
  • Apostasy or loss of ʿaql, which ends the worship itself.
  • Turning it into a gathering for idle talk and trade rather than worship.

A telling detail of how the Prophet ﷺ kept it: he did not leave except for a human need. ʿĀʾishah reported, "The Prophet ﷺ would put his head out to me from the masjid while he was in iʿtikāf, and I would comb (wash) it" (al-Bukhārī 2028) — so a limb may cross the threshold without breaking it, but the person does not leave save for necessity.

Women may observe iʿtikāf; the wives of the Prophet ﷺ did so after him (al-Bukhārī 2026). A woman menstruating does not enter iʿtikāf, and details of where and how a woman keeps it are matters the scholars discuss — ask a trustworthy scholar for your situation.

Common questions

Is fasting a condition for iʿtikāf?

The majority hold that fasting strengthens iʿtikāf and it is best joined to Ramadan, but there is a difference among the scholars on whether it is a strict condition. ʿUmar (raḍiya Allāhu ʿanhu) once vowed a night of iʿtikāf and the Prophet ﷺ told him to fulfil it (al-Bukhārī 2032) — used by some as evidence a night-only iʿtikāf is valid. Follow reliable scholarly guidance.

Can I use my phone during iʿtikāf?

Iʿtikāf is a withdrawal for Allah; its whole purpose is cutting off distraction. Using a device for Quran, beneficial knowledge or a genuine need fits that; scrolling and chatter empty the retreat of its meaning even if it technically remains valid. Guard the aim, not merely the form.

I work — can I still benefit from the last ten?

Yes. Even one or two nights of iʿtikāf is a share of this sunnah, and its heart — night prayer, seeking Laylat al-Qadr, standing in the odd nights — is open to everyone, in or out of formal iʿtikāf. Do what you can; Allah does not burden a soul beyond its capacity (2:286).

A gift for you
الاعتكاف
Iʿtikāf — the Retreat of the Last Ten
Free ebook · A gift from deen2u

Take the full guide with you

The sunnah of iʿtikāf gathered in one place — its evidence, conditions, what keeps it and what breaks it, and the striving of the Prophet ﷺ in the last ten nights.

  • What iʿtikāf is & its evidence
  • The practice of the Prophet ﷺ
  • Seeking Laylat al-Qadr
  • Conditions & what breaks it
  • Answers to common questions
Download the guide ↓PDF · Free · No sign-up

Related: Duas & Dhikr · How to Practice · Sunnah of the Prophet ﷺ

This page is informational, not a personal fatwa — for your specific situation, consult a qualified local scholar.
Shareable poster: Iʿtikāf — The Ramadan Retreat

Share this page as a poster

A 1080×1920 image made for phone screens — Stories, Status, Reels. It carries the heading and the link back here, so whoever you send it to can read the whole thing.

WhatsApp Telegram X Download

On a phone you can also long-press the poster and choose Save image. Every poster is on the poster page. Free to share — no attribution needed.