All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
The texts of the Quran and the Sunnah indicate that animals will be resurrected and gathered on the Day of Judgment to retaliate against each other. Also, traditions mention that once animals retaliate against each other, Allaah The Almighty will order them to turn to dust, and they will become dust.
Shaykh Al-Islam Ibn Taymiyyah mentioned that Allaah The Almighty will gather all animals on the Day of Judgment, as proven by the Quran and the Sunnah. Allaah The Almighty Says (what means):
Moreover, there are many famous Hadeeths on this issue. The general indication of these Hadeeths is also that Allaah The Almighty will gather all animals on the Day of Judgment to retaliate against each other. Then He will say to them: "Be dust," and they will become dust. This is the Day when the disbeliever will say: {Oh, I wish that I were dust!} [Quran 78:40]
Shaykh Al-Islam Ibn Taymiyyah also mentioned that a person who believes that animals will not be resurrected after death is absolutely wrong and is a deviant or a disbelieving person. The majority of evidence adduced by Shaykh Al-Islam Ibn Taymiyyah to support this opinion is narrated on the authority of Abu Hurayrah . [Al-Haakim, Ibn Abi Haatim, Ibn Al-Munthir and Ibn Jareer].
The Prophet, sallallaahu ‘alayhi wa sallam, said that on the Day of Resurrection all rights will be given back to their owners and even animals will retaliate against each other. [Muslim] The same applies to the animals that were mentioned in the Quran, like the hoopoe of Sulaymaan (Solomon) and the dog of the Companions of the Cave, as there is no evidence suggesting that they are an exception.