A client of the Prophet ﷺ died and left some property, but he left no child or relative. The Messenger of Allah ﷺ said: Give what he has left to a man belonging to his village. Abu Dawud said: The tradition of Sufyan is more perfect. Musaddad said: Thereupon the Prophet ﷺ said: Is there anyone belonging to his land ? They replied: Yes. He said: Then give him what he has left.
أَنَّ مَوْلًى لِلنَّبِيِّ ﷺ مَاتَ وَتَرَكَ شَيْئًا وَلَمْ يَدَعْ وَلَدًا وَلاَ حَمِيمًا فَقَالَ النَّبِيُّ ﷺ أَعْطُوا مِيرَاثَهُ رَجُلاً مِنْ أَهْلِ قَرْيَتِهِ