—would you not have settled it? Then settle what is owed to Allah, for Allah is most deserving that debts be paid.
4 – Fasting. Al-Bukhari (1952) and Muslim (1147) narrate from ʿĀʾishah (may Allah be pleased with her) that the Prophet ﷺ said: “Whoever dies while liable for fasting, his guardian should fast on his behalf.” This form of devotional substitution is therefore unanimously permitted.
Shaykh al-Islam said: “The leaders of Islam agree that the deceased benefits from supplication offered for him and from virtuous deeds performed on his behalf. This is something known by necessity in the religion of Islam, and it is established by the Quran, the Sunnah, and the consensus. Anyone who denies it is an innovator. None of those who have received the clear, authentic reports have rejected them; those who differed were only those to whom the reports had not reached. The dispute concerns exclusively the purely bodily acts of worship, such as prayer and the recitation of the Quran.”
Second opinion: the Hanafis, Hanbalis, and the later authorities among the Shafiʿis and Malikis maintained that the reward of these acts may be conveyed from a living person to another, whether that person is alive or deceased.
The early Shafiʿis and the early Malikis, however, held that the reward of purely bodily acts of worship does not reach anyone other than the performer.
Those who prohibited it—namely the early Shafiʿis—cited several proofs. Among them is the verse:
“And that man shall have nothing except what he strives for” (al-Najm 53:39).
Ibn Kathīr comments: “Just as he bears no burden but his own, he is entitled to no reward except what he has earned himself.” From this verse al-Shafiʿi (may Allah have mercy on him) and his followers deduced that the reward of Quran recitation does not reach the dead, for it is neither their deed nor their earning.
They also argued with the report recorded by Muslim (1631) from Abū Hurayrah, who said that the Messenger of Allah ﷺ declared: “When a human being dies, his work comes to an end except for three things: a righteous child who prays for him, ongoing charity, or knowledge from which people continue to benefit after him.”