Sahih al-Bukhari 1830
Umar bin Hafs bin Ghiyath related to us that my father told us that Al-A'mash related to us; he said: Ibrahim (an-Nakha'i) told me. He narrated from Aswad, and Aswad from Hazrat Abdullah (bin Mas'ud) (ra). He said: While we were with the Prophet (saw) in a cave at Mina, (the Surah) Wal-Mursalat was revealed to him. He was reciting it and I was listening and memorising it, and his face was fresh with this Surah. Suddenly a snake sprang at us. The Prophet (saw) said: “Kill it.” We rushed at it quickly, but it went away. Then the Prophet (saw) said: “Let it be. It has been saved from your harm, as you have been saved from its harm.” Abu Abdullah (Imam Bukhari (rh)) said: By mentioning this hadith we mean that Mina is part of the sacred precinct (Haram), and they saw no harm in killing a snake.
AI-translated by Islam-Today