Sahih al-Bukhari, Hadith 3310

Narrated Abu Mulaika: Ibn `Umar used to kill snakes, but afterwards he forbade their killing and said, "Once the Prophet pulled down a wall and saw a cast-off skin of a snake in it. He said, 'Look for the snake. 'They found it and the Prophet said, "Kill it." For this reason I used to kill snakes. Later on I met Abu Lubaba who told me the Prophet said, 'Do not kill snakes except the short-tailed or mutilated-tailed snake with two white lines on its back, for it causes abortion and makes one blind. So kill it.' "

حَدَّثَنِي عَمْرُو بْنُ عَلِيٍّ، حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ، عَنْ أَبِي يُونُسَ الْقُشَيْرِيِّ، عَنِ ابْنِ أَبِي مُلَيْكَةَ، أَنَّ ابْنَ عُمَرَ، كَانَ يَقْتُلُ الْحَيَّاتِ ثُمَّ نَهَى قَالَ إِنَّ النَّبِيَّ صلى الله عليه وسلم هَدَمَ حَائِطًا لَهُ، فَوَجَدَ فِيهِ سِلْخَ حَيَّةٍ فَقَالَ ‏"‏ انْظُرُوا أَيْنَ هُوَ ‏"‏‏.‏ فَنَظَرُوا فَقَالَ ‏"‏ اقْتُلُوهُ ‏"‏‏.‏ فَكُنْتُ أَقْتُلُهَا لِذَلِكَ‏.‏ فَلَقِيتُ أَبَا لُبَابَةَ فَأَخْبَرَنِي أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ لاَ تَقْتُلُوا الْجِنَّانَ، إِلاَّ كُلَّ أَبْتَرَ ذِي طُفْيَتَيْنِ، فَإِنَّهُ يُسْقِطُ الْوَلَدَ، وَيُذْهِبُ الْبَصَرَ، فَاقْتُلُوهُ ‏"‏‏.‏

sunnah.com