It was narrated from Miqdam Abu Karimah, a man from Sham who was one of the Companions of the Messenger of Allah (ﷺ), that the Messenger of Allah (ﷺ) said:
“Whoever leaves behind wealth, it is for his heirs. Whoever leaves behind poor dependents and a debt, it is for us to take care of – or he said: ‘It is for Allah and His Messenger (to take care of) – I am the heir of the one who has no heir, I will pay the blood money on his behalf and inherit from him. And the maternal uncle is the heir of the one who has no heir, he pays blood money on his behalf and inherits from him.”