Sahih Bukhari – Hadith No : 2043

Narrated Ibn `Umar: that `Umar had vowed in the Pre-Islamic period to perform I`tikaf in Al-Masjid-al-Haram. (A subnarrator thinks that `Umar vowed to perform I`tikaf for one night.) Allah’s Apostle said to `Umar, “Fulfill your vow.”

Hadith In Arabic Text :

حدثنا عبيد بن إسماعيل، حدثنا أبو أسامة، عن عبيد الله، عن نافع، عن ابن عمر، أن عمر رضى الله عنه نذر في الجاهلية أن يعتكف في المسجد الحرام قال أراه قال ليلة قال له رسول الله صلى الله عليه وسلم ‏”‏ أوف بنذرك ‏”‏‏.‏

Chapter : Retiring to a Mosque for Remembrance of Allah (I’tikaf) – كتاب الاعتكاف