Narrated Ibn 'Umar: 'Umar said "O Allah's Apostle! I vowed to perform I'tikaf for one night in Al-Masjid-al-Haram, during the Pre-Islamic Period of ignorance (before embracing Islam). "The Prophet said, "Fulfill your vow." Ibn 'Umar said to the lady, "Pray on her behalf." Ibn 'Abbas said the same.
— Sahih Bukhari, Volume 8, Book 78: Oaths and Vows, Hadith #688