Hadith 337

Anas reported that when God’s messenger entered the privy he used to say, "O God, I seek refuge in Thee from male and female devils.”* *One might be inclined to translate this phrase as "from infidelity and act of disobedience,” but the tradition from Zaid b. Arqam (p. 76) is very explicit, and so the translation above is probably the correct one. PT-2 (12-71.) (Bukhari and Muslim).

وَعَنْ أَنَسٍ قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْخَلَاءَ يَقُولُ: «اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخبث والخبائث»

Reference: 5603370
In-book reference: Book 3, Hadith 337