Private Devotional Exercises in a Mosque - Section 1 Mishkat al-Masabih 2101
Arabic hadith text
وَعَنِ ابْنِ عُمَرَ: أَنَّ عُمَرَ سَأَلَ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: " كُنْتُ نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِد الْحَرَام؟ قَالَ: «فأوف بِنَذْرِك»
Translation
Ibn ‘Umar said that when ‘Umar consulted the Prophet about a vow he had made in the pre-Islamic period to spend a night in devotion in the sacred mosque, he said, “Fulfill your vow.” (Bukhari and Muslim.)