It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When Allah Almighty afflicts a servant with a trial in his body, He commands the angel: 'Keep writing (in his record) all the good deeds that he used to do (when he was healthy).' Then if Allah grants him cure, He washes him clean (of sins) and purifies him; and if He takes his soul, He forgives him and sends down His mercy upon him."
Hadith Referenceمسند أبي يعلى الموصلي / مسند أنس بن مالك / 4235
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«حکم الحدیث مسند ابی یعلی محققاً تنسیق حسين سليم أسد - مکتبہ شاملہ :قال حسين سليم أسد: إسناده حسن . » «قال سعيد بن محمد السناري: ضعيف بهذا التمام: مضى آنفًا [برقم 4233]» «أخرجه مسند أحمد برقم: 13301، وأخرجه شرح السنة برقم: 1430، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 3845/1، مسند ابویعلیٰ ترقیم الاثری: 4220»