The first is to recite the Verse of the Throne sincerely. When he recites it, that figure disappears, sinks into the ground, or hides from view. If he were a righteous man, a king, or a believing jinn, the Verse of the Throne would not harm him; it harms only devils. This is established in the authentic collection through the report of Abū Hurayra, to whom the jinn said:
“Recite the Verse of the Throne when you go to bed. A guardian from Allah will remain over you, and no devil will approach you until morning.”
The Prophet, may Allah bless him and grant him peace, said: “He told you the truth, though he is a habitual liar.”
Another is to seek refuge in Allah from the devils.
Another is to seek refuge through the supplications prescribed by revelation. Devils would confront the prophets during their lifetimes, seeking to harm them and disrupt their worship. Thus, the jinn came to the Prophet, may Allah bless him and grant him peace, carrying a flame with which they intended to burn him. Gabriel brought him the well-known supplication for protection contained in the hadith related from Abū al-Tayyāh, who said:
“A man asked ʿAbd al-Rahmān ibn Hubaysh—an elderly man who had lived in the Prophet’s time—‘What did the Messenger of Allah, may Allah bless him and grant him peace, do when the devils plotted against him?’
“He replied: ‘They descended upon him from the mountain passes and valleys. Among them was a devil carrying a flame with which he intended to burn the Messenger of Allah, may Allah bless him and grant him peace.’
“He said: ‘The Messenger of Allah, may Allah bless him and grant him peace, was frightened. Gabriel, peace be upon him, came to him and said, “O Muhammad, say…” He asked, “What should I say?” Gabriel said, “Say: I seek refuge in the perfect words of Allah, which neither the righteous nor the wicked can overstep, from the evil of what He has created, brought forth, and brought into being; from the evil of what descends from heaven and what ascends into it; from the evil of what emerges from the earth and what descends into it; from the evil of the trials of night and day; and from the evil of every night visitor who comes, except one who comes with good, O Most Merciful.”’
“He said: ‘Their fires were extinguished, and Allah, Mighty and Majestic, defeated them.’”