Retiring to a Mosque for Remembrance of Allah (I'tikaf)
حَدَّثَنَا إِسْمَاعِيلُ بْنُ عَبْدِ اللَّهِ، عَنْ أَخِيهِ، عَنْ سُلَيْمَانَ، عَنْ عُبَيْدِ اللَّهِ بْنِ عُمَرَ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، عَنْ عُمَرَ بْنِ الْخَطَّابِ ـ رضى الله عنه ـ أَنَّهُ قَالَ يَا رَسُولَ اللَّهِ إِنِّي نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِدِ الْحَرَامِ. فَقَالَ لَهُ النَّبِيُّ صلى الله عليه وسلم " أَوْفِ نَذْرَكَ ". فَاعْتَكَفَ لَيْلَةً.Narrated `Abdullah bin `Umar:`Umar bin Al-Khattab said, "O Allah's Messenger (ﷺ)! I vowed in the Pre-Islamic period to perform I`tikaf in Al-Masjid-al-Haram for one night." The Prophet (ﷺ) said, "Fulfill your vow." So, he performed I`tikaf for one night
From Sahih al-Bukhari, whose reports the scholars accept as authentic.