Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: When a person dies, his deeds come to an end except for three things: (1) ongoing charity, (2) knowledge from which people benefit, (3) a righteous child who prays for him.