حَدَّثَنَا مُسَدَّدُ بْنُ مُسَرْهَدٍ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، وَعَبْدُ الْوَارِثِ، عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْخَلَاءَ، قَالَ: عَنْ حَمَّادٍ، قَالَ: اللَّهُمَّ إِنِّي أَعُوذُ بِكَ، وَقَالَ: عَنْ عَبْدِ الْوَارِثِ، قَالَ: أَعُوذُ بِاللَّهِ مِنَ الْخُبُثِ وَالْخَبَائِثِ .
Anas bin Malik reported: When the Messenger of Allah صلی اللہ علیہ وسلم entered the toilet, he used to say (before entering): O Allaah, I seek refuge in Thee. This is according to the version of Hammad. Abd al-Warith has another version: I seek refuge in Allaah from male and female devils.