Abu Saaib reported,

I went in to see Abu Saeed Khudri and found him praying, so I sat waiting until he finished his prayer. Then I heard a movement beneath a couch in his house, and there was a snake. I stood up to kill it, but Abu Saeed gestured for me to sit down. When he had finished, he pointed to a room in the house and asked, "Do you see this room?"I said, "Yes."He said, "There was once a young man living there, newly married. He went out with the Messenger of Allah ﷺ to the Battle of the Trench. While he was there, the young man came to him asking permission, saying, 'Messenger of Allah, give me leave to spend some time with my wife.'The Messenger of Allah ﷺ gave him permission and said, 'Take your weapon with you, for I fear what Banu Qurayzah might do to you.'The young man set off toward his wife and found her standing between the two doors. He thrust his spear toward her to stab her, for jealousy had overcome him.She said, 'Do not be hasty. Come in and see what is in your house.'He entered and found a snake coiled on his bed. He drove his spear into it, then went out and planted the spear in the courtyard. The snake writhed on the tip of the spear, and the young man fell down dead. It was not known which of them died first, the young man or the snake.We mentioned this to the Messenger of Allah ﷺ, and 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 still appears after that, then kill it, for it is only a devil."In another wording, "These houses have inhabitants. If you see any of them, give it three warnings to leave. If it goes, fine, otherwise kill it, for it is a disbeliever."And he said to them, "Go and bury your companion."

Azami 14853

Sahih

عن أبي السائب، مولى هشام بن زهرة، أنه قال

دخلت على أبي سعيد الخدري، فوجدته يصلي، فجلست أنتظره حتى قضى صلاته، فسمعت تحريكا تحت سرير في بيته، فإذا حية، فقمت لأقتلها، فأشار إلي أبو سعيد أن اجلس، فلما انصرف، أشار إلى بيت في الدار، فقال: أترى هذا البيت؟ فقلت: نعم، فقال: إنه قد كان فيه فتى حديث عهد بعرس، فخرج مع رسول الله ﷺ إلى الخندق، فبينا هو به، إذ أتاه الفتى يستأذنه، فقال: يا رسول الله، ائذن لي أحدث بأهلي عهدا، فأذن له رسول الله ﷺ، وقال: خذ عليك سلاحك، فإني أخشى عليك بني قريظة فانطلق الفتى إلى أهله، فوجد امرأته قائمة بين البابين، فأهوى إليها بالرمح ليطعنها، وأدركته غيرة، فقالت: لا تعجل حتى تدخل وتنظر ما في بيتك، فدخل، فإذا هو بحية منطوية على فراشه، فركز فيها رمحه، ثم خرج بها، فنصبه في الدار، فاضطربت الحية في رأس الرمح، وخر الفتى ميتا فما يدرى أيهما كان أسرع موتا، الفتى أم الحية؟ فذكرنا ذلك لرسول الله ﷺ فقال: إن بالمدينة جنا قد أسلموا، فإذا رأيتم منهم شيئا، فآذنوه ثلاثة أيام فإن بدا لكم بعد ذلك، فاقتلوه، فإنما هو شيطان. وفي لفظ: إن لهذه البيوت عوامر، فإذا رأيتم شيئا منها فحرجوا عليها ثلاثا، فإن ذهب، وإلا فاقتلوه فإنه كافر وقال لهم: اذهبوا فادفنوا صاحبكم.

الأعظمي 14853صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Kindness to animals
Section
Killing snakes
Numbering
Jami al-Kamil 14853 (2nd edition)
Azami 14853