is founded upon the noble ḥadith, “When I command you to do something, carry out of it whatever you are able.” [Al-Bukhārī 7288].
9 – Prayer is a sublime act of worship; it is the link between the servant and his Lord. When the worshipper stands in prayer he is privately conversing with Allah Most High, and anyone who walks in front of him disrupts that conversation and severs this divine connection by distracting the heart. For that reason the Law safeguarded the prayer with this precaution.
Benefit:
This ruling holds when the worshipper is leading the prayer or praying alone. For a follower, however, the imam’s sutra suffices, because the Messenger ﷺ would pray toward a sutra while his Companions behind him did not, and all who prayed behind him understood that they too were praying toward a sutra; therefore, nothing that passes in front of them harms their prayer. Al-Bukhārī (493) and Muslim (504) report from Ibn ʿAbbās: “I came riding a she-donkey while the Messenger of Allah ﷺ was leading the people in prayer. I passed in front of part of the row, and no one objected to me.”
Ibn ʿAbd al-Barr said: The scholars are unanimously agreed that whatever crosses in front of a follower does not harm his prayer.