Sahih Bukhari – Hadith No : 6817

Narrated Abu Huraira: The Prophet said, “I am more closer to the believers than their own selves, so whoever (of them) dies while being in debt and leaves nothing for its repayment, then we are to pay his debts on his behalf and whoever (among the believers) dies leaving some property, then that property is for his heirs.”

Hadith In Arabic Text :

حدثنا عبدان، أخبرنا عبد الله، أخبرنا يونس، عن ابن شهاب، حدثني أبو سلمة، عن أبي هريرة رضى الله عنه عن النبي صلى الله عليه وسلم قال ‏”‏ أنا أولى، بالمؤمنين من أنفسهم، فمن مات وعليه دين، ولم يترك وفاء، فعلينا قضاؤه، ومن ترك مالا فلورثته ‏”‏‏.‏

Chapter : Laws of Inheritance (Al-Faraa’id) – كتاب الفرائض