9:114
وَمَا كَانَ ٱسْتِغْفَارُ إِبْرَٰهِيمَ لِأَبِيهِ إِلَّا عَن مَّوْعِدَةٍۢ وَعَدَهَآ إِيَّاهُ فَلَمَّا تَبَيَّنَ لَهُۥٓ أَنَّهُۥ عَدُوٌّۭ لِّلَّهِ تَبَرَّأَ مِنْهُ ۚ إِنَّ إِبْرَٰهِيمَ لَأَوَّٰهٌ حَلِيمٌۭ
And the request of forgiveness of Abraham for his father was only because of a promise he had made to him. But when it became apparent to Abraham that his father was an enemy to Allah, he disassociated himself from him. Indeed was Abraham compassionate and patient.
Translation · Saheeh International
Tafsir
Ibn Kathīr (abridged)
The Prohibition of supplicating for Polytheists
Imam Ahmad recorded that Ibn Al-Musayyib said that his father Al-Musayyib said, "When Abu Talib was dying, the Prophet went to him and found Abu Jahl and `Abdullah bin Abi Umayyah present. The Prophet said,
«أَيْ عَمِّ، قُلْ لَا إِلَهَ إِلِّا اللهُ كَلِمَةً أُحَاجُّ لَكَ بِهَا عِنْدَ اللهِ عَزَّ وَجَل»
(O uncle! Say, `La ilaha illa-llah,' a word concerning which I will plea for you with Allah, the Exalted and Most Honored.) Abu Jahl and `Abdullah bin Abi Umayyah said, `O Abu Talib! Would you leave the religion of Abdul-Muttalib' Abu Talib said, `Rather, I will remain on the religion of Abdul-Muttalib.' The Prophet said,
«لَأَسْتَغْفِرَنَّ لَكَ مَا لَمْ أُنْهَ عَنْك»
(I will invoke Allah for forgiveness for you, as long as I am not prohibited from doing so.) This verse was revealed,