ʿUmar said "O Messenger of Allah ﷺ! 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.
يَا رَسُولَ اللَّهِ إِنِّي نَذَرْتُ فِي الْجَاهِلِيَّةِ أَنْ أَعْتَكِفَ لَيْلَةً فِي الْمَسْجِدِ الْحَرَامِ قَالَ أَوْفِ بِنَذْرِكَ