It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) sent out an expedition. When the people returned, there was among them a man who had recently married. He hurried to his family, and saw his wife standing at the door. He intended to strike her with his spear, but she said: "Do not be hasty; look at what is inside the house." So he entered the house and saw a snake coiled on the bed. He struck its head with the spear, and the snake had not yet died when the man died. When this reached the Messenger of Allah (peace and blessings be upon him), he (peace and blessings be upon him) said: "These houses have inhabitants from among the jinn." So the Messenger of Allah (peace and blessings be upon him) forbade killing the snakes that are found in houses, except al-abtar (the short-tailed snake) and dhu al-tufyatayn (the one with two white stripes on its back).
Imam al-Tabarani (may Allah have mercy on him) said: "No one narrated this hadith from Ubaydullah bin Umar, from Nafi', with this wording except Yahya bin Sulaym."
Hadith Referenceالمعجم الأوسط / باب العين / 4528
Hadith Gradingمحدثین:محفوظ عن ابن عمر
Hadith Takhrij«قال الدارقطني: محفوظ عن ابن عمر «العلل الواردة في الأحاديث النبوية، ج 12، ص 307»» «أخرجه أحمد فى «مسنده» برقم: 6447، والبزار فى «مسنده» برقم: 2238، وعبد الرزاق فى «مصنفه» برقم: 19619، والطحاوي فى «شرح مشكل الآثار» برقم: 2936، والطبراني فى «الصغير» برقم: 1146، 1146 م، والطبراني فى «الأوسط» برقم: 3848»