Sunan Ibn Majah, Volume 2, Book 5, Hadith 940 (DarusSalam)

It was narrated from Musa bin Talhah that his father said: “We used to perform prayer while the beasts were passing in front of us. That was mentioned to the Messenger of Allah and he said: ‘If something like the hand of a saddle* is placed in front of anyone of you, it will not matter whoever passes in front of him.”

حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا عُمَرُ بْنُ عُبَيْدٍ، عَنْ سِمَاكِ بْنِ حَرْبٍ، عَنْ مُوسَى بْنِ طَلْحَةَ، عَنْ أَبِيهِ، قَالَ كُنَّا نُصَلِّي وَالدَّوَابُّ تَمُرُّ بَيْنَ أَيْدِينَا فَذُكِرَ ذَلِكَ لِرَسُولِ اللَّهِ ـ صلى الله عليه وسلم ـ فَقَالَ ‏ "‏ مِثْلُ مُؤْخِرَةِ الرَّحْلِ تَكُونُ بَيْنَ يَدَىْ أَحَدِكُمْ فَلاَ يَضُرُّهُ مَنْ مَرَّ بَيْنَ يَدَيْهِ ‏" ‏ ‏.‏

sunnah.com