Abdullah bin Umar reported,

When Abdullah died, his son Abdullah bin Abdullah came to the Messenger of Allah ﷺ and asked him for his shirt to use as a shroud for his father, and he gave it to him. Then he asked him to pray over him, and the Messenger of Allah ﷺ rose to pray.Umar stood up and took hold of the Messenger of Allah's garment and said, "Messenger of Allah, are you going to pray over him when your Lord has forbidden you to pray over him?"The Messenger of Allah ﷺ replied, "Allah has only given me a choice. He said, 'Ask forgiveness for them or do not ask forgiveness for them. Even if you ask forgiveness for them seventy times, Allah will never forgive them, because they disbelieved in Allah and His Messenger. And Allah does not guide the rebellious people' [Tawbah 9:80]. And I shall go beyond seventy."Umar said, "But he is a hypocrite."So the Messenger of Allah ﷺ prayed over him, and Allah revealed, "And never pray over any of them who dies, nor stand at his grave" [Tawbah 9:84].

Azami 15045

Sahih

عن ابن عمر قال

لما توفي عبد الله، جاء ابنه عبد الله بن عبد الله إلى رسول الله ﷺ فسأله أن يعطيه قميصه يكفن فيه أباه، فأعطاه، ثم سأله أن يصلي عليه، فقام رسول الله ﷺ ليصلي، فقام عمر، فأخذ بثوب رسول الله ﷺ، فقال: يا رسول الله! تصلي عليه وقد نهاك ربك أن تصلي عليه؟ فقال رسول الله ﷺ: إنما خيرني الله، فقال: {استغفر لهم أولا تستغفر لهم إن تستغفر لهم سبعين مرة فلن يغفر الله لهم ذلك بأنهم كفروا بالله ورسوله والله لا يهدى القوم الفسقين} وسأزيده على السبعين. قال: إنه منافق. قال: فصلى عليه رسول الله ﷺ فأنزل الله {ولا تصل على أحد منهم مات أبدا ولا تقم على قبره} [سورة التوبة: ٨٤].

الأعظمي 15045صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Hypocrisy and the hypocrites
Section
Reports about the chief of the hypocrites, Abdullah bin Ubay bin Salul
Numbering
Jami al-Kamil 15045 (2nd edition)
Azami 15045