Musnad Ahmad 4357
Grading supplied with this record: Its isnad is saheeh]
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
It was narrated that 'Abdullah said:
We were with The Messenger of Allah (ﷺ) in a cave and (the soorah) “By the winds (or angels or the Messengers of Allah) sent forth one after another" (al-Mursalat 77:1) was revealed to him. As we were learning it fresh from his lips, a snake came out of its hole and he said, "Kill it.” We rushed to kill it but it got away from us. And the Messenger of Allah (ﷺ) said: “Allah protected it from your evil as He protected you from its evil.”
Full reference and source
Musnad Ahmad 4357 Arabic/English book : Book 26, Hadith 4357
View source on Sunnah.com (opens in a new tab)