This hadith has been transmitted on the authority of Abu Huraira with a slight variation of wording.
Sahih Muslim Book 48, Hadith 74
← Previous Hadith
I heard Allah's Messenger (ﷺ) as saying: When any one of you stays at a place, he should say:" I seek refuge in the Perfect Word of Allah from the evil of that He created." Nothing would then do him any harm until he moves from that place. Abu Huraira reported that a person came to Allah's Messenger (ﷺ) and said:" Allah's Messenger, I was stung by a scorpion during the night. Thereupon he said: Had you recited these words in the evening:" I seek refuge in the Perfect Word of Allah from the evil of what He created," it would not have done any harm to you.
Sahih Muslim Book 48, Hadith 73 Next Hadith → When you go to bed, perform ablution as is done for prayer; then lie down pn the right side and recite:" O Allah, I turn my face towards Thee and entrust my affair to Thee. I retreat unto Thee for protection with hope in Thee and fear of Thee. There is no resort and no deliverer (from hardship) but Thou only. I affirm my faith in Thine books which Thou revealed and in Thine Apostles whom Thou sent." Make this as the last word of yours (when you go to sleep) and in case you die during that night, you would die upon Fitra (upon Islam). And as I repeated these words in order to commit them to memory, I said:" I affirm my faith in Thy Messenger (Rasul) whom Thou sent." He said: Say:" I affirm my faith in the Apostle (Nabi) whom Thou sent."
Sahih Muslim Book 48, Hadith 75
Sahih Muslim Book 48, Hadith 73 Next Hadith → When you go to bed, perform ablution as is done for prayer; then lie down pn the right side and recite:" O Allah, I turn my face towards Thee and entrust my affair to Thee. I retreat unto Thee for protection with hope in Thee and fear of Thee. There is no resort and no deliverer (from hardship) but Thou only. I affirm my faith in Thine books which Thou revealed and in Thine Apostles whom Thou sent." Make this as the last word of yours (when you go to sleep) and in case you die during that night, you would die upon Fitra (upon Islam). And as I repeated these words in order to commit them to memory, I said:" I affirm my faith in Thy Messenger (Rasul) whom Thou sent." He said: Say:" I affirm my faith in the Apostle (Nabi) whom Thou sent."
Sahih Muslim Book 48, Hadith 75