Sahih Bukhari | Volume 3 | Hadith Number 258

Narrated by Abdullah bin Umar
'Umar bin Al-Khattab said, "O Allah's Apostle! I vowed in the Pre-Islamic period to perform Itikaf in Al-Masjid-al-Haram for one night." The Prophet said, "Fulfill your vow." So, he performed Itikaf for one night.