´It was narrated that Suhaib said:` "I heard Ibn Abbas narrate that he passed in front of the Messenger of Allah (ﷺ), he and a young boy of Banu Hashim, riding a donkey in front of the Messenger of Allah(ﷺ) when he was praying. Then they dismounted and joined the prayer, and he did not stop praying. Then two young girls of Banu Abdul-Muttalib started running around and grabbing him by the knees. He separated them but he did not stop praying."
Hadith Referenceسنن نسائي / كتاب القبلة / 755
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:إسناده حسن
1؎ : The meaning is that people did not consider there to be any harm in the prayer due to the passing of a donkey; for this reason, some scholars have excluded the donkey from among those things that invalidate the prayer. However, the hadith of Abu Dharr radi Allahu anhu (no. 751) in this chapter is clear and decisive. Furthermore, it is not definitive that after Ibn Abbas radi Allahu anhum let the donkey go, it actually passed in front of the imam; rather, from hadith (no. 753), it appears that the donkey remained limited to only a part of the row. And since both girls had not yet reached puberty, their passing was not considered to cause any harm.
Explanation & Benefits
Hafiz Muhammad Ameen
755. Commentary: Ibn Abbas (radi Allahu anhuma) is reasoning here that a donkey and a woman do not invalidate the prayer, whereas in other ahadith it is explicitly stated that the prayer is invalidated by them. Therefore, it can be said that here the mention is of a sutrah (barrier), not of passing in front of young girls. The main point is that the Prophet (sallallahu alayhi wa sallam) used to pray facing a sutrah. Even if it is accepted that they (the girls) passed between him (sallallahu alayhi wa sallam) and the sutrah, those girls were not of age (i.e., not adults), so their passing did not invalidate the prayer, because the prayer is invalidated by the passing of a menstruating or adult woman. And Allah knows best.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 755