" عَن جَابِرٍ قَالَ: كَانَ النَّبِىُّ ﷺ لاَ يُصَلِّى عَلَى رَجُلٍ عَلَيْه دَيْنٌ، فَأُتِى بِميِّتٍ فَسَأَلَ: هَل عَلَيْهِ دَيْنٌ؟ قَالُوا: نَعَمْ، دِينَارَانِ، قَالَ: فَصَلُّوا عَلَى صَاحِبِكُمْ، قَالَ أَبُو قَتَادَةَ هُمَا عَلَىَّ يَارَسُولَ الله، فَصَلَّى عَلَيْه، فَلَمَّا فَتَحَ الله عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ، مَنْ تَرَكَ دَيْنَا فَعَلَىَّ، وَمَنْ تَرَكَ مَالًا فَلِورَثَتِهِ ".
See similar narrations below:
Collected by Bukhārī, Muslim, Nasāʾī, Abū Dāwūd, Tirmidhī, Ibn Mājah, Aḥmad, Ibn Ḥibbān, Nasāʾī's Kubrá, Bayhaqī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. "
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ فَضْلاً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ لِدَيْنِهِ وَفَاءً صَلَّى وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ
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.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ فَضْلاً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ
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.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلاَّ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ
"The Prophet would not pray for a man who owed a debt. A deceased person was brought to him and he said: 'Does he owe any debt?' They said: 'Yes, he owes two Dinars.' He said: 'Pray for your companion.' Abu Qatadah said: 'I will pay them, O Messenger of Alllah, So he prayed for him. Then, when Allah made His Messenger rich though conquest, he said: ' I am closer to each believer than his own self. Whoever leaves behind a debt, I will pay it, and whoever leaves behind wealth, it is for his heirs."
كَانَ النَّبِيُّ ﷺ لاَ يُصَلِّي عَلَى رَجُلٍ عَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَسَأَلَ أَعَلَيْهِ دَيْنٌ قَالُوا نَعَمْ عَلَيْهِ دِينَارَانِ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ قَالَ أَبُو قَتَادَةَ هُمَا عَلَىَّ يَا رَسُولَ اللَّهِ فَصَلَّى عَلَيْهِ فَلَمَّا فَتَحَ اللَّهُ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ مَنْ تَرَكَ دَيْنًا فَعَلَىَّ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ
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."
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ إِذَا تُوُفِّيَ الْمُؤْمِنُ وَعَلَيْهِ دَيْنٌ سَأَلَ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لاَ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ ﷻ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ
The Messenger of Allah ﷺ would not say funeral prayer over a person who died while the debt was due from him. A dead Muslim was brought to him and he asked: Is there any debt due from him? They (the people) said: Yes, two dirhams. He said: Pray yourselves over your companion. Then AbuQatadah al-Ansari said: I shall pay them, Messenger of Allah. The Messenger of Allah ﷺ then prayed over him. When Allah granted conquests to the Messenger of Allah ﷺ, he said: I am nearer to every believer than himself, so if anyone (dies and) leaves a debt, I shall be responsible for paying it; and if anyone leaves property, it goes to his heirs.
كَانَ رَسُولُ اللَّهِ ﷺ لاَ يُصَلِّي عَلَى رَجُلٍ مَاتَ وَعَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَقَالَ أَعَلَيْهِ دَيْنٌ قَالُوا نَعَمْ دِينَارَانِ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَقَالَ أَبُو قَتَادَةَ الأَنْصَارِيُّ هُمَا عَلَىَّ يَا رَسُولَ اللَّهِ قَالَ فَصَلَّى عَلَيْهِ رَسُولُ اللَّهِ ﷺ فَلَمَّا فَتَحَ اللَّهُ عَلَى رَسُولِ اللَّهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ فَمَنْ تَرَكَ دَيْنًا فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ
"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.'"
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَقُولُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلاَّ قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَيْهِ الْفُتُوحَ قَامَ فَقَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُسْلِمِينَ فَتَرَكَ دَيْنًا عَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ
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.”
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يَقُولُ إِذَا تُوُفِّيَ الْمُؤْمِنُ فِي عَهْدِ رَسُولِ اللَّهِ ﷺ وَعَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لاَ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللَّهُ عَلَى رَسُولِهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَىَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالاً فَهُوَ لِوَرَثَتِهِ
"The Prophet would not pray for a man who owed a debt. A deceased person was brought to him and he said: 'Does he owe any debt?' They said: 'Yes, he owes two Dinars.' He said: 'Pray for your companion.' Abu Qatadah said: 'I will pay them, O Messenger of Alllah, So he prayed for him. Then, when Allah made His Messenger rich though conquest, he said: ' I am closer to each believer than his own self. Whoever leaves behind a debt, I will pay it, and whoever leaves behind wealth, it is for his heirs." (Using translation from Nasāʾī 1962)
كَانَ النَّبِيُّ ﷺ لَا يُصَلِّي عَلَى رَجُلٍ عَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَسَأَلَ هَلْ عَلَيْهِ دَيْنٌ؟ قَالُوا نَعَمْ دِينَارَانِ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَقَالَ أَبُو قَتَادَةَ هُمَا عَلَيَّ يَا رَسُولَ اللهِ فَصَلَّى عَلَيْهِ فَلَمَّا فَتَحَ اللهُ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ فَمَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ
"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)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمُتَوَفَّى عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ؟ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ لِلْمُسْلِمِينَ صَلُّوا عَلَىصَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ عَلَيْهِ الْفُتُوحَ قَامَ فَقَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ مِنَ الْمُؤْمِنِينَ فَتَرَكَ دَيْنًا فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ
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)
كَانَ رَسُولُ اللهِ ﷺ إِذَا شَهِدَ جَنَازَةً سَأَلَ هَلْ عَلَى صَاحِبِكُمْ دَيْنٌ؟ فَإِنْ قَالُوا نَعَمْ قَالَ هَلْ لَهُ وَفَاءٌ؟ فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لَا قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ ﷻ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ
ذِكْرُ الْخَبَرِ الْمُصَرِّحِ بِأَنَّ تَرْكَ الْمُصْطَفَى ﷺ الصَّلَاةَ عَلَى مَنْ مَاتَ وَعَلَيْهِ دَيْنٌ كَانَ ذَلِكَ فِي بَدْءِ الْإِسْلَامِ قَبْلَ فَتْحِ اللَّهِ الْفُتُوحَ عَلَيْهِ
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)
كَانَ الرَّجُلُ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ إِذَا مَاتَ وَعَلَيْهِ دَيْنٌ سَأَلَ «هَلْ لَهُ وَفَاءٌ؟ » فَإِذَا قِيلَ نَعَمْ صَلَّى عَلَيْهِ وَإِذَا قِيلَ كَلَّا قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» فَلَمَّا فَتْحَ اللَّهُ عَلَى رَسُولِهِ ﷺ الْفُتُوحَ قَالَ «أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ مَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَلِلْوَارِثِ»
ذِكْرُ الْبَيَانِ بِأَنَّ تَرْكَ الْمُصْطَفَى ﷺ الصَّلَاةَ عَلَى الْغَالِّ وَعَلَى مَنْ مَاتَ وَعَلَيْهِ دَيْنٌ إِنَّمَا كَانَ ذَلِكَ فِي أَوَّلِ الْإِسْلَامِ قَبْلَ فَتْحِ اللَّهِ جَلَّ وَعَلَا عَلَى صَفِيِّهِ الْمُصْطَفَى الْفُتُوحَ
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)
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ وَفَاءً فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» فَلَمَّا فَتَحَ اللَّهُ جَلَّ وَعَلَا عَلَيْهِ الْفُتُوحَ قَالَ «أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ»
"The Prophet would not pray for a man who owed a debt. A deceased person was brought to him and he said: 'Does he owe any debt?' They said: 'Yes, he owes two Dinars.' He said: 'Pray for your companion.' Abu Qatadah said: 'I will pay them, O Messenger of Alllah, So he prayed for him. Then, when Allah made His Messenger rich though conquest, he said: ' I am closer to each believer than his own self. Whoever leaves behind a debt, I will pay it, and whoever leaves behind wealth, it is for his heirs." (Using translation from Nasāʾī 1962)
كَانَ النَّبِيُّ ﷺ لَا يُصَلِّي عَلَى رَجُلٍ عَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَسَأَلَ «هَلْ عَلَيْهِ دَيْنٌ؟» قَالُوا نَعَمْ دِينَارَانِ قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» قَالَ أَبُو قَتَادَةَ هُمَا عَلَيَّ يَا رَسُولَ اللهِ فَصَلَّى عَلَيْهِ فَلَمَّا فَتَحَ اللهُ عَلَى رَسُولِهِ ﷺ قَالَ «أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ مَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ»
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)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا تُوُفِّيَ الْمُؤْمِنُ فِي عَهْدِ رَسُولِ اللهِ ﷺ وَعَلَيْهِ دَيْنٌ يَسْأَلُ «هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ» فَإِنْ قَالُوا نَعَمْ صَلَّى عَلَيْهِ وَإِنْ قَالُوا لَا قَالَ «صَلُّوا عَلَى صَاحِبِكُمْ» فَلَمَّا فَتَحَ اللهُ عَلَى رَسُولِهِ ﷺ الْفُتُوحَ قَالَ «أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ فَمَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَهُوَ لِوَرَثَتِهِ»
The Messenger of Allah ﷺ would not say funeral prayer over a person who died while the debt was due from him. A dead Muslim was brought to him and he asked: Is there any debt due from him? They (the people) said: Yes, two dirhams. He said: Pray yourselves over your companion. Then AbuQatadah al-Ansari said: I shall pay them, Messenger of Allah. The Messenger of Allah ﷺ then prayed over him. When Allah granted conquests to the Messenger of Allah ﷺ, he said: I am nearer to every believer than himself, so if anyone (dies and) leaves a debt, I shall be responsible for paying it; and if anyone leaves property, it goes to his heirs. (Using translation from Abū Dāʾūd 3343)
كَانَ رَسُولُ اللهِ ﷺ لَا يُصَلِّي عَلَى أَحَدٍ عَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَقَالَ هَلْ عَلَيْهِ دَيْنٌ؟ قَالُوا نَعَمْ يَا رَسُولَ اللهِ دِينَارَانِ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ قَالَ أَبُو قَتَادَةَ هُمَا عَلَيَّ يَا رَسُولَ اللهِ فَصَلَّى عَلَيْهِ فَلَمَّا فَتَحَ اللهُ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ فَمَنْ تَرَكَ دَيْنًا فَعَلَيَّ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ
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)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ يُؤْتَى بِالرَّجُلِ الْمَيِّتِ أَظُنُّهُ عَلَيْهِ الدَّيْنُ فَيَسْأَلُ هَلْ تَرَكَ لِدَيْنِهِ مِنْ قَضَاءٍ؟ فَإِنْ حُدِّثَ أَنَّهُ تَرَكَ وَفَاءً صَلَّى عَلَيْهِ وَإِلَّا قَالَ صَلُّوا عَلَى صَاحِبِكُمْ فَلَمَّا فَتَحَ اللهُ عَلَيْهِ الْفُتُوحَ قَالَ أَنَا أَوْلَى بِالْمُؤْمِنِينَ مِنْ أَنْفُسِهِمْ مَنْ تُوُفِّيَ وَعَلَيْهِ دَيْنٌ فَعَلَيَّ قَضَاؤُهُ وَمَنْ تَرَكَ مَالًا فَلِوَرَثَتِهِ