Al-Bayhaqī (1) reports—through the chain of Sālim ibn ʿAjlān, from Saʿīd ibn Jubayr, from Ibn ʿAbbās—a narration similar to what al-Wāqidī mentioned; Allah knows best.
Ishāq ibn Rāhwayh (2) said: I asked Abū Usāmah, “Did ʿUbayd Allāh relate to you, from Nāfiʿ, from Ibn ʿUmar, that when ʿAbd Allāh ibn Ubayy ibn Salūl died, his son ʿAbd Allāh came to the Messenger of Allah ﷺ and requested that he give him his shirt to shroud his father in it? The Prophet granted the request. He then asked him to lead the funeral prayer, and the Messenger of Allah ﷺ stood to pray over him. ʿUmar ibn al-Khaṭṭāb rose, seized the Prophet’s cloak and said, ‘O Messenger of Allah, will you pray over him when Allah has forbidden you to do so?’
The Messenger of Allah ﷺ replied, ‘My Lord has given me the choice, saying: “Ask forgiveness for them, or do not ask forgiveness for them; even if you were to ask forgiveness for them seventy times, Allah would never forgive them” (Tawbah 9:80). I will go beyond the seventy.’
ʿUmar said, ‘He is a hypocrite—will you pray over him?’ Then Allah revealed: “…And never pray over any one of them who dies, nor stand at his grave; indeed they disbelieved in Allah and His Messenger” (Tawbah 9:84). Abū Usāmah confirmed this and said, ‘Yes.’
The two Ṣaḥīḥs (3) transmit the report through Abū Usāmah.
In another wording recorded by al-Bukhārī and others (4), ʿUmar (may Allah be pleased with him) said: ‘I exclaimed, O Messenger of Allah, will you pray over him though on such-and-such a day he said such-and-such, and on such-and-such a day he said such-and-such?’ The Prophet ﷺ answered, ‘Leave me, O ʿUmar; I have been given a choice. Had I known that, by exceeding seventy, he would be forgiven, I would have done so.’ He then performed the prayer, after which Allah revealed: “…And never pray over any one of them who dies, nor stand at his grave…” to the end of the verse. ʿUmar said, ‘Later I marveled at my boldness toward the Messenger of Allah ﷺ; Allah and His Messenger know best.’
Sufyān ibn ʿUyaynah narrated, from ʿAmr ibn Dīnār, who heard Jābir ibn ʿAbd Allāh (may Allah be pleased with him) say: ‘The Messenger of Allah ﷺ came to the grave of ʿAbd Allāh ibn Ubayy after he had been placed in it. He ordered that he be brought out, laid him upon his knees— or upon his thighs—moistened him with his own saliva, and clothed him in his shirt. Allah knows best.’
In Ṣaḥīḥ al-Bukhārī (5) the same chain appears, with the additional note that the Prophet ﷺ clothed him in his shirt as a recompense for the time when ʿAbd Allāh ibn Ubayy had dressed al-ʿAbbās (may Allah be pleased with him) in a shirt upon his arrival in Madinah, since they had found no garment to fit him except the shirt of ʿAbd Allāh ibn Ubayy.
Al-Bayhaqī also cites here the story of Thaʿlabah ibn Ḥāṭib, how he was tried with abundant wealth and withheld the obligatory charity. We have discussed that in our Tafsīr (6) under the verse: “And among them are those who pledged to Allah, ‘If He grants us of His bounty…’ ” (Tawbah 9:75).