"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."
كَانَ النَّبِيُّ ﷺ لاَ يُصَلِّي عَلَى رَجُلٍ عَلَيْهِ دَيْنٌ فَأُتِيَ بِمَيِّتٍ فَسَأَلَ أَعَلَيْهِ دَيْنٌ قَالُوا نَعَمْ عَلَيْهِ دِينَارَانِ قَالَ صَلُّوا عَلَى صَاحِبِكُمْ قَالَ أَبُو قَتَادَةَ هُمَا عَلَىَّ يَا رَسُولَ اللَّهِ فَصَلَّى عَلَيْهِ فَلَمَّا فَتَحَ اللَّهُ عَلَى رَسُولِهِ ﷺ قَالَ أَنَا أَوْلَى بِكُلِّ مُؤْمِنٍ مِنْ نَفْسِهِ مَنْ تَرَكَ دَيْنًا فَعَلَىَّ وَمَنْ تَرَكَ مَالاً فَلِوَرَثَتِهِ