Abu Hurairah reported,

The Prophet ﷺ said, "By the One in whose hand is the soul of Muhammad, there is no believer on earth to whom I am not the closest of people. Whichever of you leaves behind a debt or dependents in need, I am his guardian. And whichever of you leaves behind wealth, it goes to his paternal relatives, whoever they may be."

Azami 6047

Sahih

عن أبي هريرة

عن النبي ﷺ قال: والذي نفس محمد بيده، إن على الأرض من مؤمن إلا أنا أولى الناس به، فأيكم ما ترك دينا، أو ضياعا فأنا مولاه، وأيكم ترك مالا فإلى العصبة من كان.

الأعظمي 6047صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Obligatory duties
Section
He who leaves wealth, it is for his heirs
Numbering
Jami al-Kamil 6047 (2nd edition)
Azami 6047