I heard a man praying for forgiveness for his parents, who were mushrikeen. I said: Would a man pray for forgiveness for his parents when they are mushrikeen? He said: Didnʿt Ibrahim (عليه السلام) pray for forgiveness for his father? I mentioned that to the Prophet ﷺ and the words ʿIt is not proper for the Prophet and those who believe to ask Allahʿs forgiveness for the Mushrikoon, even though they be of kin, after it has become clear to them that they are the dwellers of the Fire (because they died in a state of disbelief). And Ibrahimʿs (Abraham) (عليه السلام) invoking (of Allah) for his fatherʿs forgiveness was only because of a promise he [Ibrahim (Abraham]] had made to him (his father). But when it became clear to him that he (his father) is an enemy of Allah, he dissociated himself from him” At- Tawbah [9:113-114] were revealed. He [the Prophet ﷺ ] said: ʿ[That was] when he died.ʿ
سَمِعْتُ رَجُلًا يَسْتَغْفِرُ لِأَبَوَيْهِ وَهُمَا مُشْرِكَانِ فَقُلْتُ أَيَسْتَغْفِرُ الرَّجُلُ لِأَبَوَيْهِ وَهُمَا مُشْرِكَانِ؟ فَقَالَ أَوَلَمْ يَسْتَغْفِرْ إِبْرَاهِيمُ لِأَبِيهِ؟ فَذَكَرْتُ ذَلِكَ لِلنَّبِيِّ ﷺ فَنَزَلَتْ {مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكِينَ} [التوبة 113] إِلَى قَوْلِهِ {تَبَرَّأَ مِنْهُ} [التوبة 114] قَالَ لَمَّا مَاتَ