
According to the hadith of Abu Juhaym رضي الله عنه, the Prophet ﷺ said that if the person passing in front of a worshipper knew the sin of doing so, he would rather stand still for forty years than cross in front of him (Bukhari 480).
Based on this and other ahadith, Islamic scholars state that passing in front of a worshipper who has placed a sutrah in front of him is haram. This ruling applies even if the person cannot find another path or has some need.
However, if someone is praying in a pathway or a place where many people must pass and there is no other route available, then scholars have allowed passing through the sutrah area due to strong necessity. In such a case, the worshipper should also not try to stop the passerby.
Imam al-Haramain wrote that the prohibition of passing and the command to stop someone applies only when the passerby has another path. If no other way exists and people are crowded, then there is no prohibition and no need to block the person.