When Abdullah bin Ubayy bin Salul died, his son Abdullah bin Abdullah came to the Messenger of Allah ﷺ and asked him for his shirt to shroud his father in. He gave it to him. Then he asked him to pray over him, and the Messenger of Allah ﷺ rose to pray over him. Umar stood up 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. If you ask forgiveness for them seventy times' [Tawbah 9:80], and I shall ask more than seventy times."Umar said, "But he is a hypocrite!"Still, the Messenger of Allah ﷺ prayed over him, so Allah revealed, "And never pray over any of them who has died, nor stand at his grave" [Tawbah 9:84].The narrator added, "So he stopped praying over them."
حدثنا محمد بن المثنى وعبيد الله بن سعيد قالا حدثنا يحيى وهو القطان عن عبيد الله بهذا الإسناد نحوه وزاد قال فترك الصلاة عليهم