Sahih al-Bukhari 3317
Abdah bin Abdullah narrated to us that Yahya bin Adam told us. He narrated from Isra'il, Isra'il from Mansur, Mansur from Ibrahim, Ibrahim from Alqamah, Alqamah from Hazrat Abdullah (bin Mas'ud (ra)) that he said: We were with the Messenger of Allah (saw) in a cave when Surah Al-Mursalat was revealed, and we were still learning it from his (saw) mouth when a snake came out of its hole, and we rushed towards it to kill it. But it went into its hole before we reached it. The Messenger of Allah (saw) said: “Just as you were saved from its harm, it was saved from your harm.” And (Yahya) related a similar hadith from Isra'il, Isra'il from A'mash, A'mash from Ibrahim, Ibrahim from Alqamah, Alqamah from Hazrat Abdullah (bin Mas'ud (ra)). In it it is thus: We were still learning it (the Surah) fresh from his (saw) mouth. (Like Isra'il) Abu Awanah too related the same from Mughirah. And Hafs (bin Ghiyath), Abu Mu'awiyah and Sulaiman bin Qarm related it from A'mash, A'mash from Ibrahim, Ibrahim from Aswad, Aswad from Hazrat Abdullah (bin Mas'ud (ra)).
AI-translated by Islam-Today
Book 16: Five kinds of animals are harmful and allowed to be killed in Haram