Abdullah (may Allah be pleased with him) said: We were with the Messenger of Allah (peace and blessings be upon him) at Mina when suddenly a snake sprang out at us. The Prophet (peace and blessings be upon him) said: "Kill it." We rushed at it, but the snake got away from us. The Messenger of Allah (peace and blessings be upon him) said: "It has been protected from your harm just as you have been protected from its harm."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 10045