Praise be to Allah.
It is not permissible for anyone to walk in front of a person who is praying unless that is behind his sutrah (object used as a screen), or he walks far away from him, beyond the place where he is prostrating – in the event that he has not set up a sutrah – because of the report narrated by al-Bukhaari(510) and Muslim (507) which says that the Prophet (peace and blessings of Allaah be upon him) said: “If the one who passes in front of one who is praying knew what (sin) he incurs, he would realize that waiting for forty is better than passing in front of him.” Abu’l-Nadr said: I do not know whether he said forty days, or months, or years.
The worshipper should try to stop the one who wants to walk in front of him, because of the report narrated by al-Bukhaari (509) and Muslim (505 from Abu Sa’eed al-Khudri (may Allaah be pleased with him) who said: I heard the Prophet (peace and blessings of Allaah be upon him) say: “If one of you prays facing towards something that is screening him from the people, and someone wants to pass in front of him, let him push him in the chest, and if he insists then let him fight him, for he is a devil.”
If a woman walks between a worshipper and his sutrah, then the prayer is invalidated, whether the worshipper is leading the prayer or praying on his own. As for the one who is praying behind an imam, it does not affect his prayer, because the sutrah of the imam is a sutrah for him too. For further discussion of this point please see question no. 3404.
A number of scholars made an exception in the case of al-Masjid al-Haraam and granted a concession allowing people to walk in front of worshippers in that place. They were of the view that if a woman or anyone else passes in front of a worshipper it does not invalidate his prayer.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (2/40): There is nothing wrong with praying in Makkah without a sutrah. That was narrated from Ibn al-Zubayr, ‘Ata’ and Mujaahid. Al-Athram said: It was said to Ahmad: What if a man is praying with Makkah and does not use anything as a sutrah? He said: It was narrated from the Prophet (peace and blessings of Allaah be upon him) that he prayed with no sutrah between him and the tawaaf area. Ahmad said: Because Makkah is not like anywhere else, as if Makkah is special.
Ibn Abi ‘Ammaar said: I saw Ibn al-Zubayr come and pray, and the tawaaf area was between him and the qiblah, and women were walking in front of him. He would wait until the woman had passed, then he would put his forehead on the ground where her feet had been. Narrated by Hanbal in al-Manaasik.
Al-Mu’tamir said: I said to Tawoos: What if a man is praying – i.e., in Makkah – and men and women are passing in front of him? He thinks that this land is not like other lands, because many people come to Makkah in order to perform their rituals, and they crowd the place, and if the worshipper were to prevent those who want to pass in front of him, it would cause hardship for the people. End quote.
Shaykh Ibn Baaz (may Allaah have mercy on him) was asked: I have found a proven hadeeth which says: If one of you is praying and a donkey, black dog or woman passes in front of him, his prayer is invalid. If the text of the hadeeth is saheeh, what is your opinion about those who pray in al-Haram al-Shareef with women passing in front of them as they do tawaaf?
He replied: The hadeeth is saheeh. The Prophet (peace and blessings of Allaah be upon him) said: “A Muslim’s prayer is invalidated if there is nothing in front of him the height of the back of a saddle, by a woman, a donkey and a black dog.” Narrated by Imam Muslim in his Saheeh. If a black dog, a donkey or a woman passes in front of a worshipper, or between him and his sutrah each of them invalidates his prayer. This is how it was narrated in the hadeeth from the Prophet (peace and blessings of Allaah be upon him) and it is sounder than the opinions of the scholars. Concerning that there is a difference of opinion among the scholars, including those who interpreted it as meaning that it is the reward or the completeness of the prayer that is affected.
But the correct view is that it invalidates the prayer and it is spoiled by that.
But what happens in al-Masjid al-Haraam is excused according to the scholars, because it is not possible to avoid that in al-Masjid al-Haraam due to the crowding, especially at the time of Hajj. This is one of the things that is excused in al-Masjid al-Haraam and is exempt from the general meaning of the ahaadeeth. What happens of women who are doing tawaaf passing in front of people praying in al-Masjid al-Haraam does not affect them and their prayers are valid, whether naafil or obligatory. This is the correct scholarly view. End quote from Fataawa al-Shaykh Baaz (17/152).
The scholars of the Standing Committee for issuing fatwas were asked: Is it permissible to walk in front of a person who is praying in the mosque?
They replied: It is haraam to walk in front of a person who is praying, whether he has put a sutrah in front of himself or not, because of the general meaning of the hadeeth, “If the one who passes in front of one who is praying knew what (sin) he incurs, he would realize that waiting for forty is better than passing in front of him.” A number of scholars made an exception in the case of prayers offered in al-Masjid al-Haraam, and they granted a concession allowing people to walk in front of worshippers there, because of the report narrated by Katheer ibn Katheer ibn al-Muttalib from his father from his grandfather, who said: I saw the Messenger of Allaah (peace and blessings of Allaah be upon him) standing at the Hijr with the people passing in front of him. According to another report from al-Muttalib he said: I saw the Messenger of Allaah (peace and blessings of Allaah be upon him) when he had finished his seven (i.e., tawaaf), come and stand with the Corner between him and the Saqeefah, and pray two rak’ahs at the edge of the Mataaf, with no one between him and the tawaaf area. Although the isnaad of this hadeeth is da’eef, it is supported by other reports and by the general meaning of the evidence which suggests that there is no sin in that case, because of the difficulty involved in preventing people from passing in front of a worshipper in al-Masjid al-Haraam in most cases. End quote.
Fataawa al-Lajnah al-Daa’imah (7/82).
But one should not be careless about setting up something as a sutrah, even if the place is crowded, so long as it is possible to do that. Similarly one should not be careless about passing in front of a person who is praying, unless one has no other choice.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: What is the ruling on men and women passing in front of people who are praying, especially in the Haram, and does it invalidate their prayers?
He replied: As for men (walking in front of one) they do not invalidate the prayer, but one should try to stop them. As for woman, an adult woman does invalidate the prayer if she walks between you and your sutrah, or between you and the place where you prostrate, if you do not have a sutrah, whether that is in the Haram or elsewhere. But if a person cannot find any place to pray except a place where people walk, such as by the doors, then as a case of necessity it does not invalidate his prayer, because if he tried to stop the people from walking in front of him he would be moving too much in his prayer and would spoil it.
Questioner: But what is the ruling if they walk a little distance from him?
The Shaykh: If they walk far away, beyond the place where he prostrates, then it does not matter. End quote from Liqa’ al-Baab il-Maftooh (86/11).
And Allaah knows best.