From Sahih Muslim (Hadith 1125):
Abdullah b. Abbas reported that he came riding on a donkey, and the Messenger of Allah (ﷺ) was leading the people in prayer at Mina on the occasion of the Farewell Pilgrimage and (the narrator) reported:The donkey passed in front of the row and then he got down from it And joined the row along with the people
Reference: Muslim 1125