Hadith 178

Bulugh al-Maram

Book 7: Business Transactions
عَنْ أَبِي هُرَيْرَةَ ‏- رضى الله عنه ‏- أَنَّ رَسُولَ اَللَّهِ ‏- صلى الله عليه وسلم ‏-قَالَ : { إِذَا مَاتَ اَلْإِنْسَانُ اِنْقَطَعَ عَنْهُ عَمَلُهُ إِلَّا مِنْ ثَلَاثٍ : صَدَقَةٍ جَارِيَةٍ ، أَوْ عِلْمٍ يُنْتَفَعُ بِهِ، أَوْ وَلَدٍ صَالَحٍ يَدْعُو لَهُ } رَوَاهُ مُسْلِم ٌ 1‏ .‏
Abu Hurairah (RA):

Allah's Messenger (ﷺ) said: "When a son of Adam (i.e. any human being) dies his deeds are discontinued, with three exceptions: Sadaqah, whose benefit is continuous; or knowledge from which benefit continues to be reaped, or a righteous child who supplicates for him." [Reported by Muslim].