He entered upon Abu Saeed Khudri at his house and found him praying, so he sat down waiting for him to finish his prayer. He then heard a rustling among some palm branches in a corner of the house. He turned and saw a snake. He sprang up to kill it, but Abu Saeed gestured to him to sit down, so he sat.When Abu Saeed had finished his prayer, he pointed to a room in the house and said, "Do you see this room?"I said, "Yes."He said, "There was a young man of ours in it who had recently married. We went out with the Messenger of Allah ﷺ to the Trench, and this young man used to ask the Messenger of Allah ﷺ for permission at midday to return to his wife. One day he asked his permission, and the Messenger of Allah ﷺ said to him, 'Take your weapon with you, for I fear Qurayza may harm you.' So the man took his weapon and returned. He found his wife standing between the two doors, and he lowered his spear to stab her, for jealousy had seized him.She said to him, 'Hold back your spear and enter the house so you may see what made me come out.'He entered and found a huge snake coiled on the bedding. He thrust at it with his spear and ran it through. Then he came out and planted the spear in the courtyard, but the snake writhed upon it, and it is not known which of them died sooner, the snake or the young man."He said, "We came to the Messenger of Allah ﷺ and mentioned this to him and said, 'Pray to Allah to bring him back to life for us.'He said, 'Seek forgiveness for your companion.' Then he said, 'There are jinn in Madinah who have accepted Islam. If you see any of them, give it warning for three days. If it appears to you after that, then kill it, for it is only a devil.'"
أنه دخل على أبي سعيد الخدري في بيته قال: فوجدته يصلي فجلست أنتظره حتى يقضي صلاته. فسمعت تحريكا في عراجين في ناحية البيت. فالتفت فإذا حية. فوثبت لأقتلها. فأشار إلي أن اجلس فجلست، فلما انصرف أشار إلى بيت في الدار فقال: أترى هذا البيت؟ فقلت: نعم قال: كان فيه فتى منا حديث عهد بعرس قال: فخرجنا مع رسول الله ﷺ إلى الخندق، فكان ذلك الفتى يستأذن رسول الله ﷺ بأنصاف النهار، فيرجع إلى أهله فاستأذنه يوما، فقال له رسول الله ﷺ: خذ عليك سلاحك فإني أخشى عليك قريظة، فأخذ الرجل سلاحه، ثم رجع فإذا امرأته بين البابين قائمة فأهوى إليها الرمح ليطعنها به، وأصابته غيرة فقالت له: اكفف عليك رمحك، وادخل البيت حتى تنظر ما الذي أخرجني؟ فدخل فإذا بحية عظيمة منطوية على الفراش فأهوى إليها بالرمح فانتظمها به. ثم خرج فركزه في الدار، فاضطربت عليه فما يدرى أيهما كان أسرع موتا الحية أم الفتى؟ قال: فجئنا إلى رسول الله ﷺ فذكرنا ذلك له وقلنا: ادع الله يحييه لنا فقال: استغفروا لصاحبكم ثم قال: إن بالمدينة جنا قد أسلموا، فإذا رأيتم منهم شيئا فآذنوه ثلاثة أيام، فإن بدا لكم بعد ذلك فاقتلوه فإنما هو شيطان.
Malik narrated it in "Seeking Permission" (33) from Sayfi, who said, Abu Saaib, the freedman of Hisham bin Zahra, told me that he visited Abu Saeed, and he mentioned it. Muslim narrated it in "Greetings" (2236:139) through the route of Malik with the same wording. Sayfi is the freedman of Ibn Aflah.In one of his wordings, "These houses have inhabitants among the jinn, so if you see something of them, warn it away three times, and if it leaves, then well and good, but if not, then kill it, for it is an unbeliever."In another of his wordings, "These houses have inhabitants among the jinn, so if you see something of them, warn it away three times, and if it leaves, then well and good, but if not, then kill it, for it is an unbeliever," and he said to them, "Go and bury your companion."In another of his wordings, "In Madinah there is a group of jinn who have embraced Islam, so whoever sees something of these house-dwellers should give it warning three times, and if it still appears after that, let him kill it, for it is a devil."His statement, "three days," means that if it remains after three days without leaving the house, then it is not among the house-dwelling jinn, nor among those jinn who have embraced Islam, but rather it is a devil, so you bear no responsibility toward it, and you should kill it, and Allah will never give it a way to prevail over you in revenge for it, unlike the house-dwellers and those who have embraced Islam among the jinn.