The Messenger of Allah ﷺ said: “Whoever sees an afflicted person then says: ‘All praise is due to Allah who saved me from that which He has afflicted you with, and blessed me greatly over many of those whom He has created, (Al-ḥamdulillāhi alladhī ʿāfānī mimmabtalāka bihī wa faḍḍalanī ʿalā kathīrin mimman khalaqa tafḍīla)’ he shall not be struck by that affliction.”
قَالَ رَسُولُ اللَّهِ ﷺ مَنْ رَأَى مُبْتَلًى فَقَالَ الْحَمْدُ لِلَّهِ الَّذِي عَافَانِي مِمَّا ابْتَلاَكَ بِهِ وَفَضَّلَنِي عَلَى كَثِيرٍ مِمَّنْ خَلَقَ تَفْضِيلاً لَمْ يُصِبْهُ ذَلِكَ الْبَلاَءُ