The Messenger of Allah ﷺ said, "Rights will surely be restored to those entitled to them on the Day of Resurrection, to the point that the hornless sheep will be given retribution against the horned sheep."
أن رسول الله ﷺ قال: لتؤدن الحقوق إلى أهلها يوم القيامة، حتى يقاد للشاة الجلحاء من الشاة القرناء.
Muslim narrated it in the Book of Piety and Kinship (2582) through several routes, from Ismail (Ibn Jafar), from Ala, from his father, from Abu Hurairah, who related it."Al-Jalha" is the hornless one that has no horn, and the retribution between the horned and the hornless is not retribution of moral accountability, since animals bear no moral accountability. Rather, it is retribution of reciprocal compensation. This hadith contains an explicit statement that animals will be gathered on the Day of Resurrection, and this is supported by the words of Allah Most High, "And when the wild beasts are gathered" [Takwir 81:5].However, the scholars said that being gathered on the Day of Resurrection does not necessarily entail reward and punishment. Nawawi mentioned this in brief.This hadith also demonstrates the power of Allah Most High, in that He is able to gather the animals on the Day of Resurrection, even though they bear no moral accountability, so how could He not gather human beings.