[Machine] When the death of Abu Talib approached, the Prophet ﷺ came to him while Abdullah ibn Abi Umeyah and Abu Jahl ibn Hisham were with him. The Messenger of Allah ﷺ said to him, "O uncle, indeed you are the greatest of them in rights upon me and the best of them in my eyes. And you have the greatest right upon me after my parents. So say a word that will benefit you with intercession for yourself on the Day of Resurrection. Say, "There is no deity worthy of worship except Allah." They said to him, "Are you trying to abandon the religion of Abd al-Muttalib?" He remained silent, so the Messenger of Allah ﷺ repeated it to him. Abu Talib then said, "I adhere to the religion of Abd al-Muttalib." And he passed away. The Prophet ﷺ said, "I will seek forgiveness for you as long as I have not been forbidden from it." Then Allah, the Almighty, revealed the verses {It is not for the Prophet and those who have believed to ask forgiveness for the polytheists} [9:113] until the end of the verse {And the request for forgiveness of Abraham for his father} [9:114].
لَمَّا حَضَرَتْ أَبَا طَالِبٍ الْوَفَاةُ أَتَاهُ النَّبِيُّ ﷺ وَعِنْدَهُ عَبْدُ اللَّهِ بْنُ أَبِي أُمَيَّةَ وَأَبُو جَهْلِ بْنُ هِشَامُ فَقَالَ لَهُ رَسُولُ اللَّهِ ﷺ «أَيْ عَمِّ إِنَّكَ أَعْظَمُهُمْ عَلَيَّ حَقًّا وَأَحْسَنُهُمْ عِنْدِي يَدًا وَلَأَنْتَ أَعْظَمُ حَقًّا عَلَيَّ مِنْ وَالِدِي فَقُلْ كَلِمَةً تَجِبْ لَكَ عَلَيَّ بِهَا الشَّفَاعَةُ يَوْمَ الْقِيَامَةِ قُلْ لَا إِلَهَ إِلَّا اللَّهُ» فَقَالَا لَهُ أَتَرْغَبُ عَنْ مِلَّةِ عَبْدِ الْمُطَّلِبِ؟ فَسَكَتَ فَأَعَادَهَا عَلَيْهِ رَسُولُ اللَّهِ ﷺ فَقَالَ أَنَا عَلَى مِلَّةِ عَبْدِ الْمُطَّلِبِ فَمَاتَ فَقَالَ النَّبِيُّ ﷺ «لَأَسْتَغْفِرَنَّ لَكَ مَا لَمْ أُنْهَ عَنْكَ» فَأَنْزَلَ اللَّهُ ﷻ {مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَنْ يَسْتَغْفِرُوا لِلْمُشْرِكِينَ} [التوبة 113] الْآيَةُ {وَمَا كَانَ اسْتِغْفَارُ إِبْرَاهِيمَ لِأَبِيهَ} [التوبة 114] إِلَى آخِرِ الْآيَةِ