Abu Hurairah reported,

The Messenger of Allah ﷺ said, "When a person dies, their deeds come to an end except for three: an ongoing charity, knowledge that is benefited from, and a righteous child who prays for them."

Tirmidhi 1377

Sahih

حدثنا علي بن حجر أخبرنا إسمعيل بن جعفر عن العلاء بن عبد الرحمن عن أبيه

عن أبي هريرة رضي الله عنه

أن رسول الله ﷺ قال إذا مات الإنسان انقطع عمله إلا من ثلاث صدقة جارية وعلم ينتفع به وولد صالح يدعو له

الترمذي 1377صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Rulings
Chapter
Injuries caused by animals are without liability
Numbering
Darussalam 1377
Tirmidhi 1377