Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrated: We were with the Prophet (peace and blessings be upon him) in a cave when Surah "Wal-Mursalati 'urfa" was revealed to him (peace and blessings be upon him). We were learning these verses from his mouth while they were fresh when a snake came out at us. We rushed to kill it, but it escaped. Then the Prophet (peace and blessings be upon him) said: "It has been protected from your harm, and you have been protected from its harm."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10120