I heard a man asking for forgiveness for his parents and they were mushrikeen. I said: Are you asking for forgiveness for your parents when they are mushrikeen? He said: Didnʿt Ibraheem (عليه السلام) ask for forgiveness for his father when he was a mushrik? I mentioned that to the Prophet ﷺ and these verses were revealed: “It is not (proper) for the Prophet ﷺ and those who believe to ask Allahʿs forgiveness for the Mushrikeen” [At-Tawbah 9:113-114]. ‘Abdur-Rahman said: And Allah revealed [the words]. “And Ibraheemʿs (Abraham) invoking (of Allah) for his fatherʿs forgiveness was only because of a promise he [Ibraheem (Abraham)] had made to him (his father)ʿ. (Using translation from Aḥmad 1085)
سَمِعْتُ رَجُلًا يَسْتَغْفِرُ لِأَبَوَيْهِ وَهُمَا مُشْرِكَانِ فَقُلْتُ لَا تَسْتَغْفِرْ لِأَبَوَيْكَ وَهُمَا مُشْرِكَانِ فَقَالَ أَلَيْسَ قَدِ اسْتَغْفَرَ إِبْرَاهِيمُ لِأَبِيهِ وَهُوَ مُشْرِكٌ؟ فَذَكَرْتُهُ لِلنَّبِيِّ ﷺ فَنَزَلَتْ {مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكِينَ وَلَوْ كَانُوا أُولِي قُرْبَى مِنْ بَعْدِ مَا تَبَيَّنَ لَهُمْ أَنَّهُمْ أَصْحَابُ الْجَحِيمِ وَمَا كَانَ اسْتِغْفَارُ إِبْرَاهِيمَ لِأَبِيهِ إِلَّا عَنْ مَوْعِدَةٍ وَعَدَهَا إِيَّاهُ فَلَمَّا تَبَيَّنَ لَهُ أَنَّهُ عَدُوٌّ لِلَّهِ تَبَرَّأَ مِنْهُ إِنَّ إِبْرَاهِيمَ لَأَوَّاهٌ حَلِيمٌ} [التوبة 114]