‘Amr ibn Shu’aib relates from his father and from his grandfather, ‘Abdullah ibn ‘Amr ibn Al-‘Aas, that the Prophet, peace be upon him, said: “If one of you is frightened while sleeping, one should say: A’uzhu billah min hamazatish shayatin wa an yahdrun’ I seek refuge in Allah’s perfect words from His anger, His chastisement, from the evil of His creatures, and from the suggestions and approach of devils.’ Then one will never be harmed.” ‘Amr ibn Shu’aib related further that ‘Abdullah ibn ‘Amr “used to teach this prayer to his older sons who could comprehend and memorize. For those who were not able to do so, he wrote these words down, wrapped them as pendants, and made them wear these around their necks.” (Narrated by Abu Daw’ud, Nasa’i, and Tirmihi, who says it is an acceptable but unknown hadith. Al-Hakim says it is sound)
‘Aishah, Malik, and most of the scholars of the schools of Ash-Shafi’i and Ahmad ibn Hanbal also subscribe to this view. Nevertheless Ibn ‘Abbas, Ibn Mas’ud, scholars of the Hanafi school, and some scholars of the Ash-Shafi’i and Hanbali schools, according to one study, are of the opinion that it is not permissible for a person to wear anything as an amulet in the light of the above mentioned general prohibition regarding amulets.