“The leader of the hypocrites in Al- Madinah died, and left instructions that the Prophet ﷺ should offer the funeral prayer for him and shroud him in his shirt. He offered the funeral prayer for him and shrouded him in his shirt, and stood by his grave. Then Allah revealed the words: ‘And never pray (the funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave.” [9:84]
أَنْ يُصَلِّيَ عَلَيْهِ النَّبِيُّ ﷺ وَأَنْ يُكَفِّنَهُ فِي قَمِيصِهِ فَصَلَّى عَلَيْهِ وَكَفَّنَهُ فِي قَمِيصِهِ وَقَامَ عَلَى قَبْرِهِ فَأَنْزَلَ اللَّهُ {وَلاَ تُصَلِّ عَلَى أَحَدٍ مِنْهُمْ مَاتَ أَبَدًا وَلاَ تَقُمْ عَلَى قَبْرِهِ}