وَإِذَا حَضَرَ ٱلْقِسْمَةَ أُو۟لُوا۟ ٱلْقُرْبَىٰ وَٱلْيَتَـٰمَىٰ وَٱلْمَسَـٰكِينُ فَٱرْزُقُوهُم مِّنْهُ وَقُولُوا۟ لَهُمْ قَوْلًا مَّعْرُوفًا Qur’an An-Nisaa' (4:8)Wai tha h a d ara alqismata oloo alqurb a wa a lyat a m a wa a lmas a keenu fa o rzuqoohum minhu waqooloo lahum qawlan maAAroof a n
I.e., people who do not have any legal claim to the inheritance, but nevertheless deserve to be considered.
For example, in the case of orphaned children whose grandfather then dies, leaving behind other children, some scholars rule that an obligatory bequest should be made to them despite not having a share in inheritance.