Messenger of Allah, are you going to offer prayer, whereas Allah has forbidden to offer prayer for him, whereupon Messenger of Allah ﷺ said: Allah has given me a choice saying: Ask forgiveness for them or you may not ask for them; even if you ask for them seventy times, I will make an addition to the seventy. He was a hypocrite and Messenger of Allah ﷺ said prayer over him that Allah, the Exalted and Glorious, revealed the verse:" And never pray over any one of them that has died and never should you stand by his grave" (ix. 84).
لَمَّا تُوُفِّيَ عَبْدُ اللَّهِ بْنُ أُبَىٍّ ابْنُ سَلُولَ جَاءَ ابْنُهُ عَبْدُ اللَّهِ بْنُ عَبْدِ اللَّهِ إِلَى رَسُولِ اللَّهِ ﷺ فَسَأَلَهُ أَنْ يُعْطِيَهُ قَمِيصَهُ أَنْ يُكَفِّنَ فِيهِ أَبَاهُ فَأَعْطَاهُ ثُمَّ سَأَلَهُ أَنْ يُصَلِّيَ عَلَيْهِ فَقَامَ رَسُولُ اللَّهِ ﷺ لِيُصَلِّيَ عَلَيْهِ فَقَامَ عُمَرُ فَأَخَذَ بِثَوْبِ رَسُولِ اللَّهِ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ أَتُصَلِّي عَلَيْهِ وَقَدْ نَهَاكَ اللَّهُ أَنْ تُصَلِّيَ عَلَيْهِ فَقَالَ رَسُولُ اللَّهِ ﷺ إِنَّمَا خَيَّرَنِيَ اللَّهُ فَقَالَ { اسْتَغْفِرْ لَهُمْ أَوْ لاَ تَسْتَغْفِرْ لَهُمْ إِنْ تَسْتَغْفِرْ لَهُمْ سَبْعِينَ مَرَّةً} وَسَأَزِيدُ عَلَى سَبْعِينَ قَالَ إِنَّهُ مُنَافِقٌ فَصَلَّى عَلَيْهِ رَسُولُ اللَّهِ ﷺ وَأَنْزَلَ اللَّهُ ﷻ { وَلاَ تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا وَلاَ تَقُمْ عَلَى قَبْرِهِ}