حَدَّثَنَا عَبْدُ اللهِ بْنُ أَحْمَدَ بْنِ حَنْبَلٍ، حَدَّثَنِي إِبْرَاهِيمُ بْنُ الْحَجَّاجِ السَّامِيُّ، ثنا عَبْدُ الْعَزِيزِ بْنُ الْمُخْتَارِ، عَنْ خَالِدٍ الْحَذَّاءِ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، عَنِ النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «الْحَيَّاتُ مَسْخُ الْجِنِّ كَمَا مُسِخَتِ الْقِرَدَةُ، وَالْخَنَازِيرُ مِنْ بَنِي إِسْرَائِيلَ»
It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Snakes are the transformed form of the jinn, just as apes and swine were the transformed forms of (some of) the Children of Israel."