Sahih Bukhari
Retiring to a Mosque for Remembrance of Allah (Itikaf)
Volume: 003 / Book Number: 033 / Hadith Number: 260
Narrated Abu Huraira:
The Prophet used to perform Itikaf every year in the month of Ramadan for ten days, and when it was the year of his death, he stayed in Itikaf for twenty days.