Sahih Bukhari | Volume 3 | Hadith Number 248

Narrated by Ibn 'Umar
Umar asked the Prophet "I vowed in the Pre-Islamic period of ignorance to stay in Itikaf for one night in Al-Masjid al-Haram." The Prophet said to him, "Fulfil your vow."