I said, "Messenger of Allah, I had vowed during the days of ignorance to spend a night in seclusion in the Sacred Mosque."He replied, "Fulfill your vow."
حدثنا إسحق بن منصور أخبرنا يحيى بن سعيد القطان عن عبيد الله بن عمر عن نافع عن ابن عمر
قلت يا رسول الله إني كنت نذرت أن أعتكف ليلة في المسجد الحرام في الجاهلية قال أوف بنذرك
Agreed upon (by Bukhari and Muslim). Muslim also reported it in the Book of Oaths, chapter on the vow of the disbeliever and what is to be done about it when he becomes Muslim, hadith no. 1656, from the narration of Yahya Qattan, and Bukhari, hadith no. 2042, from the narration of Ubaydullah bin Umar, with the same wording.On this subject there is also a narration from Abdullah bin Amr [Abu Dawud, no. 3312] and Ibn Abbas [Abu Dawud, no. 3322].