Sahih al-Bukhari · Hadith 2044

Retiring to a Mosque for Remembrance of Allah (I'tikaf)

Narrated Abu Huraira: The Prophet (ﷺ) used to perform I`tikaf every year in the month of Ramadan for ten days, and when it was the year of his death, he stayed in I`tikaf for twenty days