Sahih al-Bukhari, Hadith 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 Messenger said to `Umar, "Fulfill your vow."
حَدَّثَنَا عُبَيْدُ بْنُ إِسْمَاعِيلَ، حَدَّثَنَا أَبُو أُسَامَةَ، عَنْ عُبَيْدِ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ ـ رضى الله عنه ـ نَذَرَ فِي الْجَاهِلِيَّةِ أَنْ يَعْتَكِفَ فِي الْمَسْجِدِ الْحَرَامِ ـ قَالَ أُرَاهُ قَالَ ـ لَيْلَةً قَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم " أَوْفِ بِنَذْرِكَ " .
also referenced under: Book 33, Hadith 18 (In-Book) & Volume 3, Book 33, Hadith 259 (USC-MSA)