What Is Itikaf? The Prophet’s ﷺ Last Ten Days in the Masjid
Contents
Every Ramadan, some people disappear into the masjid for the last ten nights, sleeping there, eating there, and leaving only when they must. That is itikaf, and it is not a later invention: his wife and Companions describe the Prophet ﷺ doing it every Ramadan. Here is what the authentic hadith say it looked like.
At a glance
- Short answer: Itikaf is staying in the masjid with the intention of worship. The Prophet ﷺ did it every Ramadan, usually in the last ten days.
- Note: These hadith give no minimum length. Conditions such as fasting are discussed by scholars; ask a qualified local scholar.
- Evidence: Bukhari 2026, 2044, 2029, 2033 · Abu Dawud 2473 · Quran 2:187
- Grade: Sahih (Bukhari) · Abu Dawud 2473: Hasan Sahih (al-Albani)
- Do it today: Pick one of the last ten nights and plan to spend it in your local masjid.
What is itikaf? What the Prophet ﷺ did every Ramadan
Aisha (may Allah be pleased with her), the wife of the Prophet ﷺ, describes a habit he kept to the very end of his life.
أَنَّ النَّبِيَّ صلى الله عليه وسلم كَانَ يَعْتَكِفُ الْعَشْرَ الأَوَاخِرَ مِنْ رَمَضَانَ حَتَّى تَوَفَّاهُ اللَّهُ، ثُمَّ اعْتَكَفَ أَزْوَاجُهُ مِنْ بَعْدِهِ
“The Prophet ﷺ used to practice i‘tikaf in the last ten days of Ramadan until Allah took him, and then his wives practiced i‘tikaf after him.”
Sahih al-Bukhari 2026 · Narrated by Aisha · Translation adapted from Sunnah.com
In the Sunnah, itikaf means staying in the masjid with the intention of worship, setting the everyday world aside for a few days. HadeethEnc’s explanation of this hadith notes that he did it seeking Laylatul Qadr, and that his wives kept it up after his death, which shows it is a Sunnah that was never cancelled, and one that women took part in too.
Ten days, and twenty in his final year
Abu Hurairah (may Allah be pleased with him) adds a detail that shows how much this worship meant to him.
كَانَ النَّبِيُّ صلى الله عليه وسلم يَعْتَكِفُ فِي كُلِّ رَمَضَانَ عَشْرَةَ أَيَّامٍ، فَلَمَّا كَانَ الْعَامُ الَّذِي قُبِضَ فِيهِ اعْتَكَفَ عِشْرِينَ يَوْمًا
“The Prophet ﷺ used to perform i‘tikaf every Ramadan for ten days, and in the year he passed away, he stayed in i‘tikaf for twenty days.”
Sahih al-Bukhari 2044 · Narrated by Abu Hurairah · Translation adapted from Sunnah.com
Ten days was his usual practice. In his last Ramadan, he doubled it; HadeethEnc explains that he did so to worship Allah more and draw even closer to Him. The last ten nights matter because Laylatul Qadr falls among them, as we explain in our guide to Laylatul Qadr.
Staying in the masjid, leaving only for a need
Aisha (may Allah be pleased with her) also describes what his days in the masjid were like, with a small, tender detail.
وَإِنْ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم لَيُدْخِلُ عَلَىَّ رَأْسَهُ وَهْوَ فِي الْمَسْجِدِ فَأُرَجِّلُهُ، وَكَانَ لاَ يَدْخُلُ الْبَيْتَ إِلاَّ لِحَاجَةٍ، إِذَا كَانَ مُعْتَكِفًا
“Allah’s Messenger ﷺ would put his head in to me while he was in the masjid, and I would comb his hair. And he would not enter the house except for a need when he was in i‘tikaf.”
Sahih al-Bukhari 2029 · Narrated by Aisha · Translation adapted from Sunnah.com
He stayed inside the masjid, and only his head reached out to her. The point of itikaf is to stay put. The hadith does not list what counts as a need; scholars discuss that in detail, so ask a qualified scholar before you plan your own itikaf.
A small tent after Fajr
In another narration, Aisha (may Allah be pleased with her) describes how his itikaf began each day.
كَانَ النَّبِيُّ صلى الله عليه وسلم يَعْتَكِفُ فِي الْعَشْرِ الأَوَاخِرِ مِنْ رَمَضَانَ، فَكُنْتُ أَضْرِبُ لَهُ خِبَاءً فَيُصَلِّي الصُّبْحَ ثُمَّ يَدْخُلُهُ
“The Prophet ﷺ used to practice i‘tikaf in the last ten days of Ramadan. I would pitch a tent for him, and he would pray the morning prayer and then enter it.”
Sahih al-Bukhari 2033 (opening part) · Narrated by Aisha · Translation adapted from Sunnah.com
A simple tent gave him a private corner inside the masjid. The full narration goes on to tell how some of his wives pitched tents too, how he left itikaf that month, and how he then made it up with ten days in Shawwal. It is worth reading in full at the link.
What Aisha said the Sunnah is in itikaf
Aisha (may Allah be pleased with her) summed up the practice in a few lines, recorded by Abu Dawud.
السُّنَّةُ عَلَى الْمُعْتَكِفِ أَنْ لاَ يَعُودَ مَرِيضًا وَلاَ يَشْهَدَ جَنَازَةً وَلاَ يَمَسَّ امْرَأَةً وَلاَ يُبَاشِرَهَا وَلاَ يَخْرُجَ لِحَاجَةٍ إِلاَّ لِمَا لاَ بُدَّ مِنْهُ وَلاَ اعْتِكَافَ إِلاَّ بِصَوْمٍ وَلاَ اعْتِكَافَ إِلاَّ فِي مَسْجِدٍ جَامِعٍ
“The Sunnah for the one in i‘tikaf is that he does not visit a sick person, does not attend a funeral, does not touch or embrace his wife, and does not go out for anything except what he cannot do without. There is no i‘tikaf without fasting, and there is no i‘tikaf except in a congregational masjid.”
Sunan Abi Dawud 2473 · Hasan Sahih (al-Albani) · Narrated by Aisha · Translation adapted from Sunnah.com
Abu Dawud notes after it that other narrators report these words as Aisha’s own statement. Scholars differ on whether fasting and a congregational (jami‘) masjid are conditions of itikaf, so we do not give a ruling here. A qualified scholar where you live can tell you what applies to you.
Where the Quran mentions itikaf
At the end of the verse about the nights of Ramadan, Allah mentions those who stay in the masjids for worship.
أُحِلَّ لَكُمْ لَيْلَةَ ٱلصِّيَامِ ٱلرَّفَثُ إِلَىٰ نِسَآئِكُمْ ۚ هُنَّ لِبَاسٌ لَّكُمْ وَأَنتُمْ لِبَاسٌ لَّهُنَّ ۗ عَلِمَ ٱللَّهُ أَنَّكُمْ كُنتُمْ تَخْتَانُونَ أَنفُسَكُمْ فَتَابَ عَلَيْكُمْ وَعَفَا عَنكُمْ ۖ فَٱلْـَٔـٰنَ بَـٰشِرُوهُنَّ وَٱبْتَغُوا۟ مَا كَتَبَ ٱللَّهُ لَكُمْ ۚ وَكُلُوا۟ وَٱشْرَبُوا۟ حَتَّىٰ يَتَبَيَّنَ لَكُمُ ٱلْخَيْطُ ٱلْأَبْيَضُ مِنَ ٱلْخَيْطِ ٱلْأَسْوَدِ مِنَ ٱلْفَجْرِ ۖ ثُمَّ أَتِمُّوا۟ ٱلصِّيَامَ إِلَى ٱلَّيْلِ ۚ وَلَا تُبَـٰشِرُوهُنَّ وَأَنتُمْ عَـٰكِفُونَ فِى ٱلْمَسَـٰجِدِ ۗ تِلْكَ حُدُودُ ٱللَّهِ فَلَا تَقْرَبُوهَا ۗ كَذَٰلِكَ يُبَيِّنُ ٱللَّهُ ءَايَـٰتِهِۦ لِلنَّاسِ لَعَلَّهُمْ يَتَّقُونَ
It has been made permissible for you the night preceding fasting to go to your wives [for sexual relations]. They are a clothing for you and you are a clothing for them. Allāh knows that you used to deceive yourselves, so He accepted your repentance and forgave you. So now, have relations with them and seek that which Allāh has decreed for you [i.e., offspring]. And eat and drink until the white thread of dawn becomes distinct to you from the black thread [of night]. Then complete the fast until the night [i.e., sunset]. And do not have relations with them as long as you are staying for worship in the mosques. These are the limits [set by] Allāh, so do not approach them. Thus does Allāh make clear His verses [i.e., ordinances] to the people that they may become righteous.
Surah al-Baqarah 2:187 · Translation: Saheeh International, from Quran.com
How to follow this Sunnah
- Ask your masjid early. Many masjids register people for itikaf before Ramadan; find out what yours allows.
- Start small if you must. The Prophet ﷺ usually did ten days. If you cannot, these hadith do not set a minimum; ask a scholar what counts, and do what you can.
- Guard the time. Like him, leave only for real needs. Put your phone away for long stretches.
- Fill the nights. Prayer at night (see tarawih), Quran, dhikr and dua, hoping for Laylatul Qadr.
- At home, still follow the spirit. If you cannot stay in a masjid, give the last ten nights more worship than the rest. This is a suggestion, not the itikaf itself.
Questions people ask
Can women do itikaf?
Yes. Bukhari 2026 says the wives of the Prophet ﷺ practiced itikaf after him. HadeethEnc 4495 adds that this is with the Shariah’s conditions and in safety. Arrangements differ between masjids, so ask a local scholar and your masjid.
How long does itikaf have to be?
The Prophet ﷺ usually stayed ten days, and twenty in his last year (Bukhari 2044). These hadith do not state a minimum, and scholars differ on it, so ask a qualified scholar.
Is itikaf only in Ramadan?
The best-known practice is the last ten days of Ramadan. In Bukhari 2033, the Prophet ﷺ made up a missed itikaf with ten days in Shawwal.
Key lessons

- Itikaf is staying in the masjid with the intention of worship.
- The Prophet ﷺ kept it every Ramadan until he passed away, and his wives continued it.
- He usually stayed ten days, and twenty in his final year.
- He left the masjid only for a need.
- The last ten nights are the time to seek Laylatul Qadr.
May Allah let us reach Ramadan, and spend its last ten nights close to Him, the way His Messenger ﷺ did.
Save this to Pinterest so you can plan your last ten nights of Ramadan

Share the reward. Send this article to someone who needs it today — teaching a hadith or dua can become a lasting good deed for you, in shaa Allah.






