Sayyiduna Abu Hurairah, may Allah be pleased with him, narrates: In the blessed time of the Prophet Muhammad, peace and blessings be upon him, when a person would pass away and he had a debt, the Prophet, peace and blessings be upon him, would ask whether he had left anything for the repayment of the debt. If it was told to him, "Yes," then the Prophet, peace and blessings be upon him, would perform his funeral prayer. And if it was told to him, "No," then the Prophet, peace and blessings be upon him, would say, "You people perform the funeral prayer of your companion." When Allah Almighty granted His Messenger, peace and blessings be upon him, victories, he said: "I am closer to the believers than their own selves. Whoever leaves behind a debt, its repayment is my responsibility, and whoever leaves behind wealth, it will go to his heirs."