When there is hope that, after listening to the Noble Qur'an and the remembrance of Allah, they may accept Islam and it may greatly soften their hearts. Allah Almighty says: « فَلَايَقْرَبُواالْمَسْجِدَالْحَرَامَبَعْدَعَامِهِمْهَٰذَا »[ سورة التوبة : 28 ] "O you who believe, indeed the polytheists are impure, so let them not approach al-Masjid al-Haram after this year."
It is narrated from Sayyiduna Uthman bin Abi al-As (may Allah be pleased with him) that a delegation from the tribe of Thaqif came to the service of the Messenger of Allah (peace and blessings be upon him), so he accommodated them in the Prophet’s Mosque so that this would soften their hearts (and they would accept Islam).
Hadith Referenceصحيح ابن خزيمه / جماع أبواب الأفعال المباحة فى المسجد غير الصلاة وذكر الله / 1328