[Machine] I heard the Messenger of Allah ﷺ say, "When Allah intends good for a servant, He purifies him before his death." They said, "O Messenger of Allah, what is the purification of a servant?" He said, "It is performing righteous deeds that Allah inspires him with until He takes him (i.e. his soul) while he is upon them."
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ «إِذَا أَرَادَ اللهُ بِعَبْدٍ خَيْرًا طَهَّرَهُ قَبْلَ مَوْتِهِ» قَالُوا يَا رَسُولَ اللهِ وَمَا طَهُورُ الْعَبْدِ؟ قَالَ «عَمَلٌ صَالِحٌ يُلْهِمُهُ إِيَّاهُ حَتَّى يَقْبِضَهُ عَلَيْهِ»