Advice for those about to perform Hajj
Fourthly. And be very careful not to walk directly in front of anyone praying in the Haraam mosque, not to speak of other mosques and prying places as the Prophet said:
“If the one walking between the hands of one praying knew what were upon him then it would be better for him to stand still for forty (…) than that he should walk between his hands.
[Maalik, al-Bukhaaree, Muslim, the 4 Sunan of Abu Juhaim].
And this is a general text covering everyone walking in front, and everyone praying – and there is no authentic Hadith to make any exception for the one doing so in the Haraam Masjid – and you should pray therein like any other place towards a sutrah – according to the general nature of the Hadith regarding that – and there are also some narrations from the Companions particularly about the Masjid-ul-Haraam – which I have mentioned in ‘The Original’.
Source: Rites of Hajj and Umrah : Shaykh Al-Albaani