This is Ayat Al-Kursi and tremendous virtues have been associated with it, for the authentic Hadith describes it as `the greatest Ayah in the Book of Allah.' Imam Ahmad recorded that `Ubayy bin Ka`b said that the Prophet asked him about the greatest Ayah in the Book of Allah, and `Ubayy answered, "Allah and His Messenger know better.'' When the Prophet repeated his question several times, `Ubayy said, "Ayat Al-Kursi.'' The Prophet commented,
« لِيَهْنِكَ الْعِلْمُ أَبَا الْمُنْذِرِ، وَالَّذِي نَفْسِي بِيَدِهِ، إِنَّ لَهَا لِسَانًا وَشَفَتَيْنِ، تُقَدِّسُ الْمَلِكَ عِنْدَ سَاقِ الْعَرْش »
(Congratulations for having knowledge, O Abu Al-Mundhir! By He in Whose Hand is my soul! This Ayah has a tongue and two lips with which she praises the King (Allah) next to the leg of the Throne.)
This Hadith was also collected by Muslim, but he did not include the part that starts with, "By He in Whose Hand...''
Imam Ahmad recorded that Abu Ayyub said that he had some dates and a Ghoul used to take some, and he complained to the Prophet. The Prophet said to him, "When you see her, say, `In the Name of Allah, answer to the Messenger of Allah'.'' Abu Ayyub said that when she came again, he said these words and he was able to grab her. She begged, "I will not come again,'' so Abu Ayyub released her. Abu Ayyub went to the Prophet and the Prophet asked him, "What did your prisoner do'' Abu Ayyub said, "I grabbed her and she said twice, `I will not come again,' and I released her.'' The Prophet said, "She will come back.'' Abu Ayyub said, "So I grabbed her twice or three times, yet each time ﴿I would release her when﴾ she vowed not to come back. I would go to the Prophet who would ask me, `What is the news of your prisoner' I would say, `I grabbed her, then released her when she said that she would not return.' The Prophet would say that she would return. Once, I grabbed her and she said, `Release me and I will teach you something to recite so that no harm touches you, that is, Ayat Al-Kursi.' Abu Ayyub went to the Prophet and told him, and the Prophet said, "She is liar, but she told the truth.'' At-Tirmidhi recorded this Hadith in the chapter of the virtues of the Qur'an and said, "Hasan Gharib.'' In Arabic, `Ghoul' refers to the Jinn when they appear at night.
Al-Bukhari recorded a similar story in his Sahih from Abu Hurayrah, in the chapters on the virtues of the Qur'an and the description of Shaytan. In this narration, Abu Hurayrah said,
"Allah's Messenger assigned me to keep watch over the Sadaqah (charity) of Ramadan. A person snuck in and started taking handfuls of foodstuff. I caught him and said, `By Allah, I will take you to Allah's Messenger.' He said, `Release me, for I am meek and have many dependents and am in great need.' I released him, and in the morning Allah's Messenger asked me, `What did your prisoner do yesterday, O Abu Hurayrah' I said, `O Allah's Messenger! He complained of being needy and of having many dependents, so I pitied him and let him go.' Allah's Messenger said, `Indeed, he told you a lie and will be coming again.' I believed that he would show up again, for Allah's Messenger had told me that he would return. So, I watched for him. When he (showed up and) started stealing handfuls of foodstuff, I caught hold of him again and said, `I will definitely take you to Allah's Messenger.' He said, `Leave me, for I am very needy and have many dependents. I promise I will not come back again.' I pitied him and let him go. In the morning Allah's Messenger asked me, `What did your prisoner do last night, O Abu Hurayrah!' I replied, `O Allah's Messenger! He complained of his great need and of too many dependents, so I took pity on him and set him free.' Allah's Messenger said, `Verily, he told you a lie; he will return.' I waited for him attentively for the third time, and when he (came and) started stealing handfuls of the foodstuff, I caught hold of him and said, `I will surely take you to Allah's Messenger as it is the third time you promised not to return, yet you returned.' He said, `Let me teach you some words which Allah will give you benefit from.' I asked, `What are they' He replied, `Whenever you go to bed, recite Ayat Al-Kursi- Allahu la ilaha illa Huwal-Hayyul-Qayyum, till you finish the whole verse. (If you do so), Allah will appoint a guard for you who will stay with you, and no Shaytan will come near you until morning.' So, I released him. In the morning, Allah's Messenger asked, `What did your prisoner do yesterday' I replied, `O Allah's Messenger! He claimed that he would teach me some words by which Allah will grant me some benefit, so I let him go.' Allah's Messenger asked, `What are they' I replied, `He said to me: Whenever you go to bed, recite Ayat Al-Kursi from the beginning to the end, Allahu la ilaha illa Huwal-Hayyul-Qayyum. He further said to me: (If you do so), Allah will appoint a guard for you who will stay with you, and no Shaytan will come near you until morning.' (One of the narrators) then commented that they (the Companions) were very keen to do good deeds. The Prophet said, `He spoke the truth, although he is a liar. Do you know whom you were talking to, these three nights, O Abu Hurayrah' Abu Hurayrah said, `No.' He said, `It was Shaytan.''' An-Nasa'i also recorded this Hadith in Al-Yawm wa Al-Laylah.