info@jamiahafs.com
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيمِ
Read Qur’anFree Islamic Library — tap to view →
الاعتكاف

Ramadan · Hanafi

I'tikaf: how to sit in the masjid for the last ten nights

I'tikaf is staying in a masjid with the intention of worship, cut off from ordinary life. The sunnah i'tikaf runs through the last ten days of Ramadan, from before sunset on the 20th until the Eid moon is sighted.

For ten days the world carries on outside, and you are not part of it. No meetings, no shopping, no scrolling: just you, the masjid and your Lord. That is i'tikaf, staying in a masjid with the intention of worship, and its sunnah form runs through the last ten days of Ramadan, from before sunset on the 20th until the Eid moon is sighted. 'A'ishah said the Prophet ﷺ kept to it in the last ten days of Ramadan until he passed away, and his wives continued it after him:

كَانَ يَعْتَكِفُ الْعَشْرَ الأَوَاخِرَ مِنْ رَمَضَانَ حَتَّى تَوَفَّاهُ اللَّهُ، ثُمَّ اعْتَكَفَ أَزْوَاجُهُ مِنْ بَعْدِهِ"The Prophet ﷺ used to do i'tikaf in the last ten days of Ramadan until Allah took him, and then his wives did i'tikaf after him." Sahih al-Bukhari 2026.

What is i'tikaf in Islam?

The word i'tikaf comes from a root meaning to stay close to something and hold to it. In the shari'ah it means staying in a masjid with the intention of i'tikaf. The person doing it is called a mu'takif. They live in the masjid, sleep and eat there, and leave only for the needs the shari'ah allows.

The Qur'an mentions i'tikaf in the verses on fasting, where Allah forbids intimacy with one's spouse during it:

وَأَنتُمۡ عَٰكِفُونَ فِي ٱلۡمَسَٰجِدِۗ"…while you are in i'tikaf in the masjids." Al-Baqarah 2:187

Ibn al-Qayyim and other scholars described the wisdom of i'tikaf beautifully: the heart is scattered by food, talk, company and sleep, and i'tikaf gathers it back to Allah. The fast cuts back food; i'tikaf cuts back company and distraction. For a few days the heart learns to find its comfort in remembrance rather than in people.

It is also, very practically, the best way to catch Laylat al-Qadr, the night "better than a thousand months" (Surah Al-Qadr, 97:3). A person in i'tikaf is in the masjid on every one of the last ten nights, so whichever night it falls on, they are there.

How did the Prophet ﷺ do i'tikaf?

After Ramadan was made obligatory in Madinah, the Prophet ﷺ did i'tikaf every year. At first he did it in the first ten days, then the middle ten, until it was shown to him that Laylat al-Qadr lies in the last ten, and from then on he kept to the last ten. Abu Hurayrah reported that he did i'tikaf for ten days every Ramadan, and in the year he passed away he did it for twenty days (Sahih al-Bukhari, hadith 2044).

A small tent or screened space was set up for him in the masjid, and 'A'ishah described pitching one for him. Inside it he would be alone with his worship. When he needed something, he would put his head out of the masjid into 'A'ishah's room, which adjoined it, and she would comb his hair; he would not enter the house except for a human need.

He told his Companions to seek Laylat al-Qadr in the odd nights of the last ten (Sahih al-Bukhari, hadith 2017). When 'A'ishah asked what she should say if she found it, he taught her: Allahumma innaka 'afuwwun tuhibbul-'afwa fa'fu 'anni, "O Allah, You are Pardoning and love to pardon, so pardon me" (Jami' at-Tirmidhi, hadith 3513). Our page on the dua for Laylat al-Qadr has it in full.

What are the three kinds of i'tikaf?

Sunnah i'tikaf

This is the i'tikaf of the last ten days of Ramadan. In the Hanafi school it is sunnah mu'akkadah 'ala al-kifayah: an emphasised sunnah on the community as a whole. If at least one person from the area does it in the local masjid, the sunnah is fulfilled for the area. If no one does it, everyone in the area shares the blame for leaving it. Because it is in Ramadan, it is done with fasting.

Wajib i'tikaf

This is i'tikaf a person has made obligatory on themselves by a vow, for example, "If I recover, I will do three days of i'tikaf for Allah." A vowed i'tikaf must be fulfilled, and in the Hanafi school it must be done with fasting. If someone vows days, the nights are included too.

Nafl i'tikaf

Voluntary i'tikaf can be done at any time of year, for any length, even a few minutes, and needs no fast. A beautiful habit is to make the intention of nafl i'tikaf every time you enter a masjid: "I intend i'tikaf for as long as I am in the masjid." Your wait for the iqamah then becomes worship too.

When does i'tikaf start and end?

To cover all ten nights, enter the masjid before sunset on the 20th of Ramadan. Sunset begins the 21st night, the first of the odd nights, so you must already be inside. The i'tikaf ends at sunset on the last day of Ramadan, when the Eid moon is sighted on the 29th or when 30 days are complete.

For Ramadan 1448, if the first fast is on Monday 8 February 2027 (Saudi), the 20th of Ramadan falls on Saturday 27 February 2027, so you would enter before sunset that day. Where the first fast is on Tuesday 9 February (as expected in India), enter before sunset on Sunday 28 February. Eid al-Fitr is expected on Tuesday 9 March 2027 (Saudi) or Wednesday 10 March (India). These dates depend on the moon sighting, so follow your local masjid or moon-sighting committee. See our Ramadan 2027 dates for updates, and check sunset for your city on our Ramadan timetable.

Make the intention as you enter: "I intend the sunnah i'tikaf of the last ten days of Ramadan." The intention is in the heart; saying it aloud is optional.

Where should brothers and sisters do i'tikaf?

Brothers

Men do i'tikaf in a masjid where the five daily prayers are held in congregation. The best is the Masjid al-Haram, then the Prophet's Masjid in Madinah, then Masjid al-Aqsa, then a Jami' masjid where Jumu'ah is held, so that you do not have to leave for it. The whole prayer area counts as the masjid; areas such as the shoe rack, the wudu block or the imam's flat outside the prayer area often do not, so ask the masjid committee where the boundary is.

Sisters

In the Hanafi school, women do i'tikaf at home, in the place set aside for salah (masjid al-bayt). If the home has no such place, she sets aside a clean corner or a room, makes it her prayer place, and stays there. For her, that spot has the rules of the masjid: she does not leave it except for the needs listed below, and she does not wander around the house.

If she is married, she needs her husband's permission, and once he gives it he should not withdraw it in the middle. A wise sister plans ahead: her period must not be due in the ten days, since the start of menstruation ends the i'tikaf. Family can bring her food and she may speak with them about necessary matters, but she should guard her time just as a brother in the masjid would. Many sisters find this the most peaceful ten days of their year.

When is it allowed to leave the masjid during i'tikaf?

You may leave only for a genuine need, go straight there and come straight back without lingering. The needs the Hanafi scholars allow are:

  • Natural needs. Going to the toilet.
  • Wudu and wajib ghusl, if there is no place to do them inside the masjid. A cooling or Jumu'ah bath that is not obligatory is not a valid reason to leave.
  • Jumu'ah, if your masjid does not hold it. Leave in time to pray the sunnah before the khutbah, and return soon after the prayer and its sunnah.
  • Food, only if there is no one to bring it to you. Eat it in the masjid.

Leaving to visit the sick, attend a funeral, go to work or sort out a problem at home is not among these needs, and doing so breaks the sunnah i'tikaf. Plan everything before the 20th so that nothing pulls you out. If a real emergency arises, such as saving a life, leave and make the i'tikaf up later.

What breaks i'tikaf, and what is disliked in it?

  • Leaving the masjid without a valid need, even for a short time.
  • Intimacy with one's spouse, as the verse says. Kissing and touching with desire are also forbidden, and break the i'tikaf if they lead to emission.
  • For sisters, the start of menstruation or postnatal bleeding.
  • Breaking the fast in a sunnah or vowed i'tikaf, since fasting is part of it.

If the sunnah i'tikaf breaks, make up one day later with a fast; many muftis advise entering before sunset and staying until sunset the next day, in the masjid (or at home for a sister). You may stay on for the remaining days, which now count as nafl i'tikaf, and you still benefit from being there on the remaining nights.

Things that are disliked

  • Worldly talk. Ordinary necessary words are fine, but long chats about business, politics or football waste the very time you came for.
  • Complete silence as an act of worship. Keeping silent and thinking it is itself a virtue is disliked. Silence from what is useless is good; silence that replaces dhikr and Qur'an is not.
  • Bringing goods into the masjid to sell. A mu'takif may arrange a necessary purchase, but trading is not for the masjid.

How should you spend your days and nights in i'tikaf?

The goal is not to survive ten days in the masjid. It is to give your heart a reset. Fill the time with Qur'an (many aim to finish one or more full readings), nafl prayer, especially at night, dhikr, dua for yourself, your family and the ummah, and quiet reflection on your life. Speak only good. Sleep enough to stay alert at night, and keep your phone switched off or with a family member.

A sample daily timetable

  • Suhur and Fajr. Eat, pray Fajr in congregation, then morning adhkar and Qur'an until sunrise.
  • Morning. Ishraq prayer, then sleep for a few hours.
  • Late morning to Zuhr. Qur'an with meaning, a short tafsir or seerah reading, then Zuhr.
  • Afternoon. Short nap, Qur'an, then 'Asr and evening adhkar.
  • Before iftar. The fasting person's dua is hoped to be answered; spend the last minutes before Maghrib with your hands raised.
  • Night. Iftar, Maghrib, rest, 'Isha and tarawih, then long qiyam in the odd nights, ending with tahajjud and suhur.

On the odd nights (the 21st, 23rd, 25th, 27th and 29th), give extra effort, and repeat 'A'ishah's dua often. In 1448 the 27th night is expected on the evening of Friday 5 March 2027 (Saudi) or Saturday 6 March (India), but do not limit your effort to one night. A Qur'an reading planner helps you set a realistic target for the ten days.

How do you prepare for i'tikaf, and what comes after it?

A simple packing list

  • Clothes for ten days, a prayer mat, a towel and a thin mattress or sleeping bag.
  • Toiletries: miswak, toothbrush, unscented soap and deodorant so you do not trouble others.
  • A mushaf you are comfortable reading, a book of duas and one or two light books of seerah or tafsir.
  • Dates, water bottle and any medicine you take, with a note for the masjid team if you have a health condition.
  • Earplugs and an eye mask, which help a great deal in a busy masjid.

Manners in a shared masjid

In most masjids you will share the space with other mu'takifs and with people coming for prayer. Keep your area small and tidy, and fold your bedding away before each congregation so the rows are not blocked. Keep your voice low when others are sleeping or reciting, and do not use the masjid as a dining hall that leaves crumbs and smells for worshippers. Respect the imam and the committee, who are often stretched thin in Ramadan. Your character during these ten days is part of your worship, and a mu'takif who troubles others has missed something of its spirit.

Family and work

Sit with your family before Ramadan. Make sure bills, school runs, shopping and Eid clothes are arranged. Ask for leave from work early, and hand over anything urgent. Tell your family whom to call in an emergency and when they may bring food. I'tikaf is not a reason to leave dependants without support.

If you cannot do the full ten days

Many people cannot take ten days off. Do not lose the blessing altogether: make the intention of nafl i'tikaf each time you are in the masjid, stay from 'Isha to Fajr on the odd nights, or spend your weekends there. Someone else in the masjid can fulfil the communal sunnah, and you still earn the reward of what you do.

After i'tikaf

The real test of i'tikaf is the week after Eid. Keep one habit you built: a daily portion of Qur'an, two rak'at of tahajjud, or less time on your phone. Our free Library has printable sheets to keep your Qur'an going, and our Ramadan month guide gathers what you need for the whole month.

Sources

  1. The Qur'an, Surah Al-Baqarah (2), verse 187.
  2. The Qur'an, Surah Al-Qadr (97), verse 3.
  3. Sahih al-Bukhari, hadith 2026: the Prophet ﷺ did i'tikaf in the last ten days of Ramadan until he passed away, and his wives after him.
  4. Sahih al-Bukhari, hadith 2044: ten days every Ramadan, and twenty in the year he passed away.
  5. Sahih al-Bukhari, hadith 2017: seek Laylat al-Qadr in the odd nights of the last ten.
  6. Jami' at-Tirmidhi, hadith 3513: the dua taught to 'A'ishah for Laylat al-Qadr.

Questions

Frequently asked

When should I enter the masjid for i'tikaf?
Enter before sunset on the 20th of Ramadan, so that you are inside when the 21st night begins.
Is i'tikaf compulsory?
The i'tikaf of the last ten days is an emphasised communal sunnah in the Hanafi school. If one person in the area does it, the sunnah is fulfilled for all. A vowed i'tikaf is wajib.
Can I leave the masjid for Jumu'ah?
Yes, if your masjid does not hold Jumu'ah. Leave in time for the sunnah before the khutbah and return soon after the prayer.
What happens if my sunnah i'tikaf breaks?
Make up one day later with a fast. You may stay for the remaining days as nafl i'tikaf.
When does i'tikaf end?
It ends at sunset on the last day of Ramadan, when the Eid moon is sighted or 30 days are complete.
Can women do i'tikaf?
Yes. In the Hanafi school a woman does i'tikaf at home, in the place set aside for salah, with her husband's permission if she is married.
Can I use my phone in i'tikaf?
Necessary calls are allowed, but scrolling and long worldly chats waste the purpose of i'tikaf. It is best to switch the phone off or give it to family.
Can I do i'tikaf for less than ten days?
Yes, as nafl i'tikaf. It can be any length, at any time, and does not need a fast.

Learn with a qualified teacher

Live online classes in Maktab, Tajweed and Hifz, with female teachers for sisters and children. Your first class is free.

Register free · first class is free