Volume 3 · Book 33 · Hadith 248
Narrated Ibn 'Umar: Umar asked the Prophet "I vowed in the Pre-lslamic period of ignorance to stay in Itikaf for one night in Al-Masjid alHaram." The Prophet said to him, "Fulfill your vow."
— Sahih Bukhari, Volume 3, Book 33: Retiring to a Mosque for Remembrance of Allah (I'tikaf), Hadith #248