Inheritance of an emancipated slave who has no heirs

Q: There was a bondswoman who was emancipated according to the general order of emancipating slaves, and then she got married. Her husband died and she had no children. She went to the house of one of her ex-masters. She grew older and was in need of help and care. Her ex-masters continued caring for her until she died. She left about five thousand riyals that she had gathered from the money that was given to her as charity.What should we do concerning this money that she left? Who will inherit this money? Give us a detailed Fatwa! May Allah protect and reward you!

A: If this emancipated woman has heirs, the money she left should be distributed among her heirs as they are the most worthy of it. But if she does not have heirs and she was emancipated by her master, her master will be her heir. If her master died, his heirs such as his son, grandsons, (Part No. 16; Page No. 568) his father, grandfather, his full brothers, half brothers and their sons will inherit from her. This is according to the saying of the Prophet (peace be upon him): "The Wala' (manumitter's right of inheritance from their freed slave) would go to him who emancipates." This Hadith was reported by Al-Bukhari and Muslim. It was also reported by Al-Tirmidhy in his book Al-Jami` that the Prophet (peace be upon him) said: "Wala' is treated like genealogy. " This means that Wala' is considered a reason for inheritance in the same way as kinship. But if this woman was emancipated by the state, all the money she left should be given to Bayt-ul-Mal (Muslim treasury) through the court. This is because Bayt-ul-Mal is the channel of spending the money that has no owner. Moreover, Bayt-ul-Mal is considered in this case the cause for her emancipation, and therefore the master of the slave has no right to inherit from her because he is not the one who emancipated her. May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.