The Book of the Prohibited actions

Riyad as-Salihin · Chapter 343

Prohibition of passing in front of a Worshipper while he is offering Salat (Prayer)

باب تحريم المرور بين يدي المصلي

When someone stands in prayer they have entered a space set apart for meeting their Lord, and this chapter teaches us to honor that space rather than cut across it. The single hadith uses a vivid image to show just how seriously the Prophet (peace be upon him) regarded interrupting a worshipper's path.

The heart of it is courtesy rooted in reverence: a small act of patience, simply waiting rather than walking through, protects another person's moment of devotion. Notice how the sin of cutting across is framed as so weighty that the one who truly grasped it would rather wait a very long time than do it.

Hadith 1758

Abul-Juhaim 'Abdullah bin Al-Harith (May Allah be pleased with him) said:

عن أبي الجهيم عبد الله بن الحارث بن الصمة الأنصاري رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏ "‏لو يعلم المار بين المصلي ماذا عليه لكان أن يقف أربعين خيرًا له من أن يمر بين يديه‏" ‏ ‏(‏‏(‏قال الراوي‏:‏ لا أدري قال أربعين يومًا، أو أربعين شهرًا، أو أربعين سنة‏)‏‏)‏‏.‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

The Messenger of Allah (ﷺ) said, "If the person who passes in front of a praying person, realizes the enormity of the sinfulness of this act, it will have been better for him to wait forty than to pass in front of him." [Al-Bukhari and Muslim]. [The narrator was not sure whether the Prophet (ﷺ) said forty days, months or years.]

In plain words

The Prophet said that if someone knew how serious it is to cut across in front of a person praying, he would rather wait a very long time than do it. The lesson is to honour another's prayer by simply waiting instead of walking through.

Reference : Riyad as-Salihin 1758 In-book reference : Book 17, Hadith 248