Muwatta Imam Malik Book of Hair, Hadith 10
Yahya related to me from Malik that Yahya ibn Said said, "When the Messenger of Allah ﷺ was taken on the Night Journey, he saw an evil jinn seeking him with a torch of fire. Whenever the Messenger of Allah ﷺ 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 ﷺ 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!
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، أَنَّهُ قَالَ أُسْرِيَ بِرَسُولِ اللَّهِ ﷺ فَرَأَى عِفْرِيتًا مِنَ الْجِنِّ يَطْلُبُهُ بِشُعْلَةٍ مِنْ نَارٍ كُلَّمَا الْتَفَتَ رَسُولُ اللَّهِ ﷺ رَآهُ فَقَالَ لَهُ جِبْرِيلُ أَفَلاَ أُعَلِّمُكَ كَلِمَاتٍ تَقُولُهُنَّ إِذَا قُلْتَهُنَّ طَفِئَتْ شُعْلَتُهُ وَخَرَّ لِفِيهِ فَقَالَ رَسُولُ اللَّهِ ﷺ " بَلَى " فَقَالَ جِبْرِيلُ فَقُلْ أَعُوذُ بِوَجْهِ اللَّهِ الْكَرِيمِ وَبِكَلِمَاتِ اللَّهِ التَّامَّاتِ اللاَّتِي لاَ يُجَاوِزُهُنَّ بَرٌّ وَلاَ فَاجِرٌ مِنْ شَرِّ مَا يَنْزِلُ مِنَ السَّمَاءِ وَشَرِّ مَا يَعْرُجُ فِيهَا وَشَرِّ مَا ذَرَأَ فِي الأَرْضِ وَشَرِّ مَا يَخْرُجُ مِنْهَا وَمِنْ فِتَنِ اللَّيْلِ وَالنَّهَارِ وَمِنْ طَوَارِقِ اللَّيْلِ وَالنَّهَارِ إِلاَّ طَارِقًا يَطْرُقُ بِخَيْرٍ يَا رَحْمَنُ .