my mosque, and al-Aqsa Mosque.”
In this statement the Messenger of Allah ﷺ blocks every avenue that could lead to shirk: it prevents people from treating non-ritual sites as ritual ones and from turning journeys to graves into a pretext for worshipping them. These three mosques alone are excepted because they possess special virtues that distinguish them from all others:
– They are the mosques built by the prophets, peace be upon them.
– The Sacred Mosque is the Muslims’ qibla, and al-Aqsa was their first qibla.
– Each was founded upon piety from the very first day.
– Prayer performed in them is multiplied far beyond the reward of prayer in any other mosque.
Because of these merits, travelling specifically to these mosques is sanctioned, whereas undertaking a journey to graves and shrines is an excess that leads to major shirk. Polytheism is forbidden, and whatever leads to it is likewise forbidden: the means share the ruling of their ends.
Scholarly disagreement
The scholars unanimously agree that visiting graves is recommended for men, but they differ regarding women.
• The Ḥanafis consider it recommended for women just as for men, basing this on the general, unrestricted command to visit graves.
• The majority—including the other three Imams—deem it disliked for women, restricting the command to men because the pronoun in the original text is masculine and does not encompass women. They also cite Muslim (938) from Umm ʿAṭiyyah: “We were forbidden to visit graves, though the prohibition was not emphatic,” and al-Tirmidhī (1056): “Allah has cursed women who frequently visit graves.”