Building a mosque as a ongoing charity (sadaqah jariyah) for one’s father
Question: Someone builds a mosque for his deceased father and says: “O my Lord! May this mosque be an ongoing charity for my deceased father.”
Answer: Yes, it will be an ongoing charity for him, but he did not build it; rather, you built it. As long as people continue to pray in this mosque and benefit from it, your father will continue to receive its reward.
But I will tell you of a better act than this, and it is that you make supplication for your father and do righteous deeds for yourself, because the Messenger ﷺ said:
“When a person dies, all his deeds are cut off except for three: an ongoing charity, knowledge from which benefit is derived, or a righteous child who supplicates for him.”
Here, ongoing charity means the charity that the deceased established before his death. Regarding children, he ﷺ did not say:
“Or his righteous child who gives charity for him.”
He ﷺ pointed to the way of supplication, not to deeds. I wish to advise this brother who asked the question, or whoever has asked it, to supplicate for the deceased abundantly and to do righteous deeds for himself.