It wasnarrated that Ibn 'Umar said:
"When 'Abdullah bin Ubayy died,his son came to the Prophet (ﷺ) and said: 'O Messenger of Allah,give me your shirt so that I may shroud him in it.' The MessengerofAllah (ﷺ) said: 'Notify me when he is ready (i.e., when he hasbeenwashed and shrouded).' When the Prophet (ﷺ) wanted to offerthefuneral prayer for him: 'You should not do that.' The Prophet(aw)offered the funeral prayer for him, and the Prophet (ﷺ) saidto him:'I have been given two choices: "...ask forgiveness forthem(hypocrites) or ask not forgiveness for them...'" [9:80]Then Allahrevealed: 'And never pray (the funeral prayer) for anyof them(hypocrites) who dies, nor stand at his grave.'" [9:84]
English reference: Vol. 1, Book 6, Hadith 1523
Arabic reference: Book 6, Hadith 1590