I said to Muaz bin Jabal, "Tell me the story of the Satan."He said, "The Messenger of Allah ﷺ put me in charge of the dates of charity. I would enter the storeroom and find the dates diminished, so I mentioned this to the Messenger of Allah ﷺ. He said, 'The Satan is taking them.'So I entered the storeroom and shut the door behind me. Then a great black shape appeared and covered the doorway, then entered through a crack in the door and transformed into the shape of an elephant, and began eating. I tied my garment around my waist and seized him, my hands meeting around his middle.I said, 'Enemy of Allah, what brought you into my house to eat the dates?'He said, 'I am an old man, poor, with a family to feed. This village belonged to us before Muhammad ﷺ, your companion, was sent. When he was sent, we were driven out of it. We are jinn from Nasibin. Let me go, for I will never return to you.'Then Jibreel came and informed the Prophet ﷺ of his report. When the Prophet ﷺ prayed the morning prayer, his caller called out, 'Where is Muaz? What did your captive do?'I told him what had happened, and he said, 'He will indeed return to you.'So I came to the storeroom at night and shut the door. He came and began eating the dates, and my hands closed upon him.I said, 'Enemy of Allah!'He said, 'I will not return to you after this.'I said, 'You said you would not return.'He said, 'I will tell you something which, if you say it, the Satan will not enter the house, "To Allah belongs whatever is in the heavens and whatever is on the earth" [Baqarah 2:284] to the end of the surah.'"
قلت لمعاذ بن جبل: أخبرني عن قصة الشيطان قال: جعلني رسول الله ﷺ على تمر الصدقة، فكنت أدخل الغرفة فأجد في التمر نقصانا فذكرته لرسول الله ﷺ فقال: إن الشيطان يأخذ قال: ودخلت الغرفة، وأغلقت الباب علي فجاء سواد عظيم، فغشي الباب، ثم دخل من شق الباب، فتحول في صورة فيل فجعل يأكل فشددت ثوبي على وسطي، فأخذته فالتقت يداي على وسطه وقلت: يا عدو الله ما أدخلك بيتي تأكل التمر؟ قال: أنا شيخ كبير فقير ذو عيال وقد كانت لنا هذه القرية قبل أن يبعث محمد ﷺ صاحبكم فلما بعث أخرجنا منها، ونحن من جن نصيبين، خل عني؛ فإني لن أعود إليك، وجاء جبرئيل عليه السلام فأخبر النبي ﷺ بخبره فلما صلى الغداة، نادى مناديه: أين معاذ ما فعل أسيرك؟ فأخبرته فقال: أما إنه سيعود إليك. فجئت الغرفة ليلا، وأغلقت الباب، فجاء فجعل يأكل التمر فقبضت يداي عليه فقلت: يا عدو الله قال: إني لن أعود إليك بعد قال: قد قلت إنك لا تعود قال: إني أخبرك بشيء إذا قلته لم يدخل الشيطان البيت: {لله ما في السموات وما في الأرض} إلى آخر السورة. [ سورة البقرة: ٢٨٤].
No references are available.
Tabarani related it in al-Kabir (20/161-162), Abu Naeem in al-Dalail (547), and Bayhaqi in al-Dalail (7/109), all of them through routes going back to Abdul-Mumin bin Khalid Hanafi, who said, Abdullah bin Burayda Aslami narrated to us, from Abu Aswad Duwali, and he related it.Its chain is hasan because of Abdul-Mumin bin Khalid Hanafi, about whom Abu Hatim said, "There is no harm in him," and Ibn Hibban mentioned him among the trustworthy narrators. The hadith has other routes with Tabarani in al-Kabir (20/51, 101) and in Musnad Shamiyin (1612), and this one is the best of them, and Allah knows best.