Narrated Jabir bin Samurah: The Prophet ﷺ offered funeral prayer over Ibn al-Dahdah while we were present. He was then brought a horse, and it was tied until he rode it. It then began to gallop and we were running around it.
Hadith Referenceسنن ابي داود / كتاب الجنائز / 3178
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح مسلم (965)
´It was narrated that Jabir bin Samurah said:` "The Messenger of Allah went our to the funeral of Ibn Ad-Dahdah, and when he came back an unsaddled horse was brought to him, so he rode and we walked with him."
Hafiz Muhammad Ameen
Urdu marginal note: It is permissible to return riding (on a mount) after performing the funeral prayer. There is no difference of opinion in this matter. It is also permissible to go (to the funeral) riding. For details, see the benefits and issues of Hadith: 1944.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 2028
This hadith has been narrated by Abu Hurairah (RA) by another chain of transmitters except for the words narrated by Rabi' bin Muslim:" Allah may make his face like the face of an ass."
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary:Benefits and Issues: To precede the imam in any pillar (rukn) of the prayer is a sign and indication of foolishness, stupidity, and lack of sense, and in this characteristic, the donkey is well-known. And according to the principle that the punishment corresponds to the nature of the deed, Allah, Lord of all the worlds, can distort the appearance and form of such a person, making it like the form of a donkey. And this is not difficult for Him. Therefore, a person performing prayer should not precede the imam in any pillar, for who knows if the wrath of Allah may be provoked and the appearance of such a person may be transformed. This is a warning (wa‘id), and its occurrence depends on the will (mashiyyah) of Allah, so its occurrence is not necessary. And Mulla Ali Qari has narrated an incident of a muhaddith, that he considered the occurrence of this warning to be far-fetched and, in prayer, committed the act of preceding the imam, so Allah transformed his face to resemble that of a donkey; thus, he would narrate hadiths to people from behind a curtain. (Fath al-Mulhim: 2/64)
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 965