Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:13345Abū ʿAbdullāh al-Ḥāfiẓ > Abū Bakr b. Isḥāq > Aḥmad b. Ibrāhīm > Ibn Bukayr > al-Layth > ʿUqayl > Ibn Shihāb > Abū Salamah b. ʿAbd al-Raḥman > Abū Hurayrah

Whenever a dead man in debt was brought to Messenger of Allah ﷺ he would ask, "Has he left anything to repay his debt?" If he was informed that he had left something to repay his debts, he would offer his funeral prayer, otherwise he would tell the Muslims to offer their friend's funeral prayer. When Allah made the Prophet ﷺ wealthy through conquests, he said, "I am more rightful than other believers to be the guardian of the believers, so if a Muslim dies while in debt, I am responsible for the repayment of his debt, and whoever leaves wealth (after his death) it will belong to his heirs. " (Using translation from Bukhārī 2298)   

البيهقي:١٣٣٤٥أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو بَكْرِ بْنُ إِسْحَاقَ أنبأ أَحْمَدُ بْنُ إِبْرَاهِيمَ ثنا ابْنُ بُكَيْرٍ ثنا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ؟ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ عَلَيْهِ الْفُتُوحَ قَامَ فَقَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُسْلِمِينَ فَتَرَكَ دَيْنًا فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ يَحْيَى بْنِ بُكَيْرٍ وَأَخْرَجَهُ مُسْلِمٌ مِنْ وَجْهٍ آخَرَ عَنِ اللَّيْثِ

See similar narrations below:

Collected by Bukhārī, Muslim, Nasāʾī, Tirmidhī, Ibn Mājah, Aḥmad, Ibn Ḥibbān, Nasāʾī's Kubrá, Bayhaqī
bukhari:2298Yaḥyá b. Bukayr > al-Layth > ʿUqayl > Ibn Shihāb > Abū Salamah > Abū Hurayrah

Whenever a dead man in debt was brought to Messenger of Allah ﷺ he would ask, "Has he left anything to repay his debt?" If he was informed that he had left something to repay his debts, he would offer his funeral prayer, otherwise he would tell the Muslims to offer their friend's funeral prayer. When Allah made the Prophet ﷺ wealthy through conquests, he said, "I am more rightful than other believers to be the guardian of the believers, so if a Muslim dies while in debt, I am responsible for the repayment of his debt, and whoever leaves wealth (after his death) it will belong to his heirs. "  

البخاري:٢٢٩٨حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ حَدَّثَنَا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ فَضْلاً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ لِدَيْنِهِ وَفَاءً صَلَّى وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ  

bukhari:5371Yaḥyá b. Bukayr > al-Layth > ʿUqayl > Ibn Shihāb > Abū Salamah > Abū Hurayrah

A dead man in debt used to be brought to Messenger of Allah ﷺ who would ask, "Has he left anything to re pay his debts?" If he was informed that he had left something to cover his debts the Prophet ﷺ would offer the funeral prayer for him; otherwise he would say to the Muslims present there), "Offer the funeral prayer for your friend:"but when Allah helped the Prophet ﷺ to gain victory (on his expeditions), he said, "I am closer to the Believers than themselves, so. if one of the Believers dies in debt, I will repay it, but if he leaves wealth, it will be for his heirs.  

البخاري:٥٣٧١حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ حَدَّثَنَا اللَّيْثُ عَنْ عُقَيْلٍ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ فَضْلاً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ  

muslim:1619a[Chain 1] Zuhayr b. Ḥarb > Abū Ṣafwān al-Umawī > Yūnus al-Aylī [Chain 2] Ḥarmalah b. Yaḥyá > ʿAbdullāh b. Wahb > Yūnus > Ibn Shihāb > Abū Salamah b. ʿAbd al-Raḥman > Abū Hurayrah

You observe prayer for your companion. But when Allah opened the gateways of victory for him, he said: I am nearer to the believers than themselves, so if anyone dies leaving a debt, its payment is my responsibility, and if anyone leaves a property, it goes to his heirs.  

مسلم:١٦١٩aوَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ حَدَّثَنَا أَبُو صَفْوَانَ الأُمَوِيُّ عَنْ يُونُسَ الأَيْلِيِّ ح وَحَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى وَاللَّفْظُ لَهُ قَالَ أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلاَّ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ  

nasai:1963Yūnus b. ʿAbd al-Aʿlá > Ibn Wahb > Yūnus And Ibn Abū Dhiʾb > Ibn Shihāb > Abū Salamah > Abū Hurayrah

if a believer died with debts outstanding, the Messenger of Allah would ask whether he had left behind anything to pay off his debts. If they said yes, he would pray for him, but if they said no, he would say: "Pray for your companion." Then, when Allah made His Messenger rich through conquest, he said: "I am closer to the believers than their own selves. Whoever dies and leaves behind a debt, I will pay it, and whoever leavers behind wealth, it is for his heirs."  

النسائي:١٩٦٣أَخْبَرَنَا يُونُسُ بْنُ عَبْدِ الأَعْلَى قَالَ أَنْبَأَنَا ابْنُ وَهْبٍ قَالَ أَخْبَرَنِي يُونُسُ وَابْنُ أَبِي ذِئْبٍ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا تُوُفِّيَ الْمُؤْمِنُ وَعَلَيْهِ دَيْنٌ سَأَلَ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لاَ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ ﷻ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ  

tirmidhi:1070Abū al-Faḍl Maktūm b. al-ʿAbbās al-Tirmidhī > ʿAbdullāh b. Ṣāliḥ > al-Layth > ʿUqayl > Ibn Shihāb > Abū Salamah b. ʿAbd al-Raḥman > Abū Hurayrah

"A deceased man would be brought to the Messenger of Allah while a debt was due upon him. So he would say: 'Has he left anything to pay off his debt?' If he was told that he had left something to pay it then he would pray (the funeral prayer) for him. Otherwise he would tell the Muslims: 'Pray for your companion.' So when Allah granted him the victories, he stood and said: 'I am more worthy in the case of the believers than they themselves are. So whoever among the believers dies and leaves a debt behind, then it is up to me to fulfill it. And whoever leaves wealth behind, then it is for his heirs.'"  

الترمذي:١٠٧٠حَدَّثَنَا أَبُو الْفَضْلِ مَكْتُومُ بْنُ الْعَبَّاسِ التِّرْمِذِيُّ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ صَالِحٍ قَالَ حَدَّثَنِي اللَّيْثُ قَالَ حَدَّثَنِي عُقَيْلٌ عَنِ ابْنِ شِهَابٍ قَالَ أَخْبَرَنِي أَبُو سَلَمَةَ بْنُ عَبْدِ الرَّحْمَنِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَقُولُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَامَ فَقَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُسْلِمِينَ فَتَرَكَ دَيْنًا عَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ وَقَدْ رَوَاهُ يَحْيَى بْنُ بُكَيْرٍ وَغَيْرُ وَاحِدٍ عَنِ اللَّيْثِ بْنِ سَعْدٍ نَحْوَ حَدِيثِ عَبْدِ اللَّهِ بْنِ صَالِحٍ
ibnmajah:2415Aḥmad b. ʿAmr b. al-Sarḥ al-Miṣrī > ʿAbdullāh b. Wahb > Yūnus > Ibn Shihāb > Abū Salamah > Abū Hurayrah

if a believer died at the time of the Messenger of Allah ﷺ and he had debts, the Messenger of Allah ﷺ would ask: “Did he leave anything with which to off his debt?” If they said yes, then he would offer the funeral prayer for him, but if they said no, then he would say: “Pray for your companion.” When Allah granted his Prophet ﷺ the conquests, he said: “I am nearer to the believers than their own selves. Whoever dies owing a debt, I will pay it off for him, and whoever leaves behind wealth, it will be for his heirs.”  

ابن ماجة:٢٤١٥حَدَّثَنَا أَحْمَدُ بْنُ عَمْرِو بْنِ السَّرْحِ الْمِصْرِيُّ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ وَهْبٍ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يَقُولُ إِذَا تُوُفِّيَ الْمُؤْمِنُ فِي عَهْدِ رَسُولِ اللَّهِ ﷺ وَعَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لاَ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَى رَسُولِهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ  

ahmad:9848Ḥajjāj > Layth > ʿUqayl > Ibn Shihāb > Abū Salamah b. ʿAbd al-Raḥman > Abū Hurayrah

"A deceased man would be brought to the Messenger of Allah while a debt was due upon him. So he would say: 'Has he left anything to pay off his debt?' If he was told that he had left something to pay it then he would pray (the funeral prayer) for him. Otherwise he would tell the Muslims: 'Pray for your companion.' So when Allah granted him the victories, he stood and said: 'I am more worthy in the case of the believers than they themselves are. So whoever among the believers dies and leaves a debt behind, then it is up to me to fulfill it. And whoever leaves wealth behind, then it is for his heirs.'" (Using translation from Tirmidhī 1070)  

أحمد:٩٨٤٨حَدَّثَنَا حَجَّاجٌ قَالَ حَدَّثَنَا لَيْثٌ قَالَ حَدَّثَنَا عُقَيْلٌ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ؟ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَىصَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ عَلَيْهِ الْفُتُوحَ قَامَ فَقَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ  

ahmad:7899Yazīd > Ibn Abū Dhiʾb > al-Zuhrī > Abū Salamah > Abū Hurayrah

if a believer died with debts outstanding, the Messenger of Allah would ask whether he had left behind anything to pay off his debts. If they said yes, he would pray for him, but if they said no, he would say: "Pray for your companion." Then, when Allah made His Messenger rich through conquest, he said: "I am closer to the believers than their own selves. Whoever dies and leaves behind a debt, I will pay it, and whoever leavers behind wealth, it is for his heirs." (Using translation from Nasāʾī 1963)   

أحمد:٧٨٩٩حَدَّثَنَا يَزِيدُ أَخْبَرَنَا ابْنُ أَبِي ذِئْبٍ عَنِ الزُّهْرِيِّ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ قَالَ

كَانَ رَسُولُ اللهِ ﷺ إِذَا شَهِدَ جَنَازَةً سَأَلَ هَلْ عَلَى صَاحِبِكُمْ دَيْنٌ؟ فَإِنْ قَالُوا نَعَمْ قَالَ هَلْ لَهُ وَفَاءٌ؟ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لَا قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ ﷻ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ  

ذِكْرُ الْبَيَانِ بِأَنَّ تَرْكَ الْمُصْطَفَى ﷺ الصَّلَاةَ عَلَى الْغَالِّ وَعَلَى مَنْ مَاتَ وَعَلَيْهِ دَيْنٌ إِنَّمَا كَانَ ذَلِكَ فِي أَوَّلِ الْإِسْلَامِ قَبْلَ فَتْحِ اللَّهِ جَلَّ وَعَلَا عَلَى صَفِيِّهِ الْمُصْطَفَى الْفُتُوحَ

ibnhibban:4854Muḥammad b. al-Ḥasan b. Qutaybah Biʿasqalān > Ḥarmalah b. Yaḥyá > Ibn Wahb > Yūnus > Ibn Shihāb > Abū Salamah > Abū Hurayrah

You observe prayer for your companion. But when Allah opened the gateways of victory for him, he said: I am nearer to the believers than themselves, so if anyone dies leaving a debt, its payment is my responsibility, and if anyone leaves a property, it goes to his heirs. (Using translation from Muslim 1619a)  

ابن حبّان:٤٨٥٤أَخْبَرَنَا مُحَمَّدُ بْنُ الْحَسَنِ بْنِ قُتَيْبَةَ بِعَسْقَلَانَ قَالَ حَدَّثَنَا حَرْمَلَةُ بْنُ يَحْيَى قَالَ حَدَّثَنَا ابْنُ وَهْبٍ قَالَ أَخْبَرَنَا يُونُسُ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ وَفَاءً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» فَلَمَّا فَتَحَ اللَّهُ جَلَّ وَعَلَا عَلَيْهِ الْفُتُوحَ قَالَ «أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ»  

nasai-kubra:2101Yūnus b. ʿAbd al-Aʿlá > Ibn Wahb > Yūnus And Ibn Abū Dhiʾb > Ibn Shihāb > Abū Salamah > Abū Hurayrah

if a believer died at the time of the Messenger of Allah ﷺ and he had debts, the Messenger of Allah ﷺ would ask: “Did he leave anything with which to off his debt?” If they said yes, then he would offer the funeral prayer for him, but if they said no, then he would say: “Pray for your companion.” When Allah granted his Prophet ﷺ the conquests, he said: “I am nearer to the believers than their own selves. Whoever dies owing a debt, I will pay it off for him, and whoever leaves behind wealth, it will be for his heirs.” (Using translation from Ibn Mājah 2415)  

الكبرى للنسائي:٢١٠١أَخْبَرَنَا يُونُسُ بْنُ عَبْدِ الْأَعْلَى قَالَ أَخْبَرَنَا ابْنُ وَهْبٍ قَالَ أَخْبَرَنِي يُونُسُ وَابْنُ أَبِي ذِئْبٍ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا تُوُفِّيَ الْمُؤْمِنُ فِي عَهْدِ رَسُولِ اللهِ ﷺ وَعَلَيْهِ دَيْنٌ يَسْأَلُ «هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ» فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لَا قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» فَلَمَّا فَتَحَ اللهُ عَلَى رَسُولِهِ ﷺ الْفُتُوحَ قَالَ «أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ»  

bayhaqi:13297Abū ʿAbdullāh al-Ḥāfiẓ And ʾAbū Zakariyyā b. Abū Isḥāq Waʾabū Bakr b. al-Ḥasan al-Qāḍī > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > Baḥr b. Naṣr > Ibn Wahb > Yūnus > Ibn Shihāb > Abū Salamah > Abū Hurayrah ؓ

Whenever a dead man in debt was brought to Messenger of Allah ﷺ he would ask, "Has he left anything to repay his debt?" If he was informed that he had left something to repay his debts, he would offer his funeral prayer, otherwise he would tell the Muslims to offer their friend's funeral prayer. When Allah made the Prophet ﷺ wealthy through conquests, he said, "I am more rightful than other believers to be the guardian of the believers, so if a Muslim dies while in debt, I am responsible for the repayment of his debt, and whoever leaves wealth (after his death) it will belong to his heirs. " (Using translation from Bukhārī 2298)   

البيهقي:١٣٢٩٧أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ وَأَبُو زَكَرِيَّا بْنُ أَبِي إِسْحَاقَ وَأَبُو بَكْرِ بْنُ الْحَسَنِ الْقَاضِي قَالُوا ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ ثنا بَحْرُ بْنُ نَصْرٍ ثنا ابْنُ وَهْبٍ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ أَظُنُّهُ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ؟ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ مَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ  

رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ حَرْمَلَةَ عَنِ ابْنِ وَهْبٍ وَأَخْرَجَهُ الْبُخَارِيُّ مِنْ وَجْهٍ آخَرَ عَنْ يُونُسَ