Abdullah bin Umar reported,

When Abdullah bin Ubayy bin Salul died, his son Abdullah bin Abdullah came to the Messenger of Allah ﷺ and asked him for his shirt so that he might shroud his father in it. The Prophet gave it to him. Then he asked him to pray over his father, so the Messenger of Allah ﷺ stood up to pray over him.At that Umar rose and took hold of the garment of the Messenger of Allah ﷺ and said, "Messenger of Allah, are you going to pray over him when Allah 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.' [Tawbah 9:80] And I will do more than seventy."Umar said, "But he is a hypocrite."Still the Messenger of Allah ﷺ prayed over him, and then Allah عز وجل revealed, "And never pray over any of them who has died, nor stand at his grave." [Tawbah 9:84]

Muslim 6211

Sahih

و حدثناه عمرو الناقد والحسن بن علي الحلواني وعبد بن حميد كلهم عن يعقوب بن إبراهيم بن سعد حدثنا أبي عن صالح بن كيسان عن ابن شهاب قال أخبرني يحيى بن سعيد بن العاص أن سعيد بن العاص أخبره أن عثمان وعائشة حدثاه أن أبا بكر الصديق استأذن على رسول الله ﷺ فذكر بمثل حديث عقيل عن الزهري

مسلم 6211صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Virtues of the Companions, may Allah be pleased with them
Chapter
From the virtues of Uthman bin Affan, may Allah be pleased with him
Numbering
Darussalam 6211
Muslim 6211