My mother came to visit me while she was still a polytheist, during the period when Quraysh had a treaty with the Muslims. I sought the advice of the Messenger of Allah ﷺ, saying, "Messenger of Allah, my mother has come to me hoping for my kindness. Should I maintain ties with her?"He replied, "Yes, maintain ties with your mother."
قدمت علي أمي وهي مشركة في عهد قريش إذ عاهدهم فاستفتيت رسول الله ﷺ، فقلت: يا رسول الله، قدمت علي أمي وهي راغبة، أفأصل أمي؟ قال: نعم، صلي أمك.
Bukhari narrated it in the Book of Gifts (2620), and Muslim narrated it in the Book of Zakat (1003), both through Abu Usama, from Hisham bin Urwa, from his father, from Asma bint Abu Bakr, who then related the hadith. Bukhari also narrated it in the Book of Manners (5978) through Sufyan bin Uyayna, from Hisham, in abridged form. He added, "Allah Most High then revealed concerning her, "Allah does not forbid you from being kind and just to those who have not fought you because of your religion and have not driven you out of your homes. Allah loves those who are just" [Mumtahinah 60:8]."