When a deceased man who owed a debt was brought to the Prophet (peace and blessings be upon him), he (peace and blessings be upon him) would ask: "Is there anything to pay off his debt?" If he was told that there was, he would lead the funeral prayer; otherwise he would say: "Offer the funeral prayer for your brother." When the conquests increased, he (peace and blessings be upon him) said: "I am closer to the believers than their own selves. Whoever among the Muslims dies and leaves a debt, it is upon me (that is, its payment); and whoever leaves wealth, it is for his heirs."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13345