Sayyiduna Abu Ayyub (may Allah be pleased with him) says: I used to be troubled by something that came into the house at night, so I complained about it to the Messenger of Allah (peace and blessings be upon him). He says: There was a skylight in one of our rooms. He (peace and blessings be upon him) said: "Lie in wait for it; when you see something, say: Be gone, the Messenger of Allah (peace and blessings be upon him) summons you." He says: So I lay in wait, and suddenly something dangled down from the skylight. I leapt at it and said: Be gone, the Messenger of Allah (peace and blessings be upon him) summons you. And I seized it, and it pleaded humbly with me and said to me: I will not come back. The narrator says: So I let it go. When morning came, I went to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) said: "What did your captive do?" I told him what had happened, and he (peace and blessings be upon him) said: "Listen, it will certainly come back." The narrator says: I did this three times; each time I would seize it and tell the Prophet (peace and blessings be upon him) what had happened. When it was the third time, I seized it and said: You will not leave me until I take you to the Messenger of Allah (peace and blessings be upon him). It adjured me and pleaded humbly with me and said: I will teach you something which, if you say it at night, neither any jinn nor any thief will come near you. The narrator says: It said: Recite Ayat al-Kursi. The narrator says: So I let it go; then I came to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "What did your captive do?" I said: O Messenger of Allah! It adjured me and pleaded humbly with me until I took pity on it, and it taught me something which, when I say it, neither any jinn nor any thief will come near me. He (peace and blessings be upon him) said: "It spoke the truth, even though it is a great liar."
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 3999