"'Abdullah bin 'Abdullah bin Ubayy came to the Messenger of Allah ﷺ when his father died, and said: 'Give me your shirt to shroud him in and perform the Salat upon him, and seek forgiveness for him.' So he ﷺ gave him his shirt, and said: 'When you are finished then inform me.' So when he wanted to perform the Salat, 'Umar tugged at him and said: 'Has not Allah prohibited that you perform Salat over the hypocrites?' He said: 'I have been given the choice between two: 'Whether you seek forgiveness for them or you do not seek forgiveness for them.... (9:80)' So he performed the Salat for him. Then Allah revealed: 'And never pray for any of them who dies, nor stand at his grave... (9:84)' So he abandoned praying for them."
جَاءَ عَبْدُ اللَّهِ بْنُ عَبْدِ اللَّهِ بْنِ أُبَىٍّ إِلَى النَّبِيِّ ﷺ حِينَ مَاتَ أَبُوهُ فَقَالَ أَعْطِنِي قَمِيصَكَ أُكَفِّنْهُ فِيهِ وَصَلِّ عَلَيْهِ وَاسْتَغْفِرْ لَهُ فَأَعْطَاهُ قَمِيصَهُ وَقَالَ إِذَا فَرَغْتُمْ فَآذِنُونِي فَلَمَّا أَرَادَ أَنْ يُصَلِّيَ جَذَبَهُ عُمَرُ وَقَالَ أَلَيْسَ قَدْ نَهَى اللَّهُ أَنْ تُصَلِّيَ عَلَى الْمُنَافِقِينَ فَقَالَ أَنَا بَيْنَ خِيرَتَيْنِ (اسْتَغْفِرْ لَهُمْ أَوْ لاَ تَسْتَغْفِرْ لَهُمْ ) فَصَلَّى عَلَيْهِ فَأَنْزَلَ اللَّهُ (وَلَا تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا وَلاَ تَقُمْ عَلَى قَبْرِهِ ) فَتَرَكَ الصَّلاَةَ عَلَيْهِمْ