Salama bin Akwa reported,

I was with the Prophet ﷺ when a funeral bier was brought to him. The people said, "Prophet of Allah, pray over him."He asked, "Did he leave anything behind?"They replied, "No."He asked, "Did he leave any debt upon himself?"They answered, "No."So he prayed over him.Then another bier was brought. He asked, "Did he leave any debt upon himself?"They said, "No."He asked, "Did he leave anything behind?"They said, "Three dinars."He said, "Three brands of fire," and prayed over him.Then a third bier was brought. He asked, "Did he leave any debt upon himself?"They said, "Yes."He asked, "Did he leave anything behind?"They said, "No."He said, "Pray over your companion yourselves."A man from the Ansar named Abu Qatada said, "Messenger of Allah, his debt is upon me."So he prayed over him.

Ahmad 16527

Sahih

قال حدثنا يحيى بن سعيد عن يزيد قال حدثنا

سلمة بن الأكوع قال

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

أحمد 16527صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Ibn Rai al-Ayir from Ashja
Numbering
Darussalam 16527
Ahmad 16527