Evidence that the islam of one who becomes muslim on his deathbed is valid, so long as the death thoes have not begun; Abrogation of permission to supplicate for forgiveness for the idolators; Evidence that one who dies an idolator is one of the people of hell and no intervention can save him from that Sahih Muslim 25 a
Arabic hadith text
حَدَّثَنَا مُحَمَّدُ بْنُ عَبَّادٍ، وَابْنُ أَبِي عُمَرَ، قَالاَ حَدَّثَنَا مَرْوَانُ، عَنْ يَزِيدَ، - وَهُوَ ابْنُ كَيْسَانَ - عَنْ أَبِي حَازِمٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لِعَمِّهِ عِنْدَ الْمَوْتِ "قُلْ لاَ إِلَهَ إِلاَّ اللَّهُ أَشْهَدُ لَكَ بِهَا يَوْمَ الْقِيَامَةِ " . فَأَبَى فَأَنْزَلَ اللَّهُ { إِنَّكَ لاَ تَهْدِي مَنْ أَحْبَبْتَ} الآيَةَ
Translation
It is narrated on the authority of Abu Huraira that the Messenger of Allah said to his uncle at the time of his death
Make a profession of it that there is no god but Allah and I will bear testimony (of your being a Muslim) on the Day of judgment. But he (Abu Talib) refused to do so. Then Allah revealed this verse: "Indeed, [O Muḥammad], you do not guide whom you like, but Allāh guides whom He wills. And He is most knowing of the [rightly] guided."(Quran 28:56).