Muwatta Malik, Book 51, Hadith 10 (USC-MSA) ⓘ
Yahya related to me from Malik that Yahya ibn Said said, "When the Messenger of Allah, may Allah bless him and grant him peace, was taken on the Night Journey, he saw an evil jinn seeking him with a torch of fire. Whenever the Messenger of Allah, may Allah bless him and grant him peace, turned, he saw him. Jibril said to him, 'Shall I teach you some words to say? When you say them, his torch will be put out and will fall from him.' The Messenger of Allah, may Allah bless him and grant him peace, said, 'Yes, indeed.' Jibril said, 'Say, 'I seek refuge with the Noble Face of Allah and with the complete words of Allah which neither the good person nor the corrupt can exceed, from the evil of what descends from the sky and the evil of what ascends in it, and from the evil of what is created in the earth and the evil of what comes out of it, and from the trials of the night and day, and from the visitations of the night and day, except for one that knocks with good, O Merciful!" "' Audhu bi wajhi'llahi' l-karim wa bi kalimati'llahi't-tammati. Allati la yujawazu hunna barra wa la fajir, min sharri ma yanzil min as-sama, wa sharri ma yaruju fiha, wa sham ma dhara' fi'l-ard, wa sharri ma yakhruju minha, wa min fitani'l-layli wa'n-nahar, wa min tawariqi'l-layli wa'n-nahar illa tariqan yatruq bikhayr ya Rahman!
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، أَنَّهُ قَالَ أُسْرِيَ بِرَسُولِ اللَّهِ صلى الله عليه وسلم فَرَأَى عِفْرِيتًا مِنَ الْجِنِّ يَطْلُبُهُ بِشُعْلَةٍ مِنْ نَارٍ كُلَّمَا الْتَفَتَ رَسُولُ اللَّهِ صلى الله عليه وسلم رَآهُ فَقَالَ لَهُ جِبْرِيلُ أَفَلاَ أُعَلِّمُكَ كَلِمَاتٍ تَقُولُهُنَّ إِذَا قُلْتَهُنَّ طَفِئَتْ شُعْلَتُهُ وَخَرَّ لِفِيهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " بَلَى " فَقَالَ جِبْرِيلُ فَقُلْ أَعُوذُ بِوَجْهِ اللَّهِ الْكَرِيمِ وَبِكَلِمَاتِ اللَّهِ التَّامَّاتِ اللاَّتِي لاَ يُجَاوِزُهُنَّ بَرٌّ وَلاَ فَاجِرٌ مِنْ شَرِّ مَا يَنْزِلُ مِنَ السَّمَاءِ وَشَرِّ مَا يَعْرُجُ فِيهَا وَشَرِّ مَا ذَرَأَ فِي الأَرْضِ وَشَرِّ مَا يَخْرُجُ مِنْهَا وَمِنْ فِتَنِ اللَّيْلِ وَالنَّهَارِ وَمِنْ طَوَارِقِ اللَّيْلِ وَالنَّهَارِ إِلاَّ طَارِقًا يَطْرُقُ بِخَيْرٍ يَا رَحْمَنُ .
also referenced under: Book 51, Hadith 1742 (In-Book)