It was narrated that Jabir said:
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.