As for the three mosques, the scholars unanimously agree that it is recommended to visit them for prayer and similar devotions. If, however, a person vows to do so, does the vow make it obligatory? On this point the jurists hold two well-known positions:
The first (1) maintains that a vow obliges only the visit to the Sacred Mosque in Mecca; this is one of the two opinions reported from al-Shāfiʿī and is the school of Abū Ḥanīfah. Their reasoning is based on the principle that a vow imposes an obligation only for acts whose category is already obligatory in the Sharīʿah.
The second view—adopted by Mālik (2), Aḥmad, and others (3)—is that a vow obliges visiting all three mosques. Yet if the pilgrim fulfils the vow by going to the more excellent mosque, that suffices for the lesser. Thus, if someone vows to visit the Mosque of Madinah and the Mosque of Aelia (Jerusalem), reaching the Sacred Mosque in Mecca discharges the vow; and if he vows to visit the Mosque of Aelia, a visit to either of the Two Sanctuaries suffices.
This ruling rests on the authentic statement of the Prophet, peace and blessings be upon him:
“Whoever vows to obey Allah, let him obey Him; and whoever vows to disobey Him, let him not disobey Him.” (4)
The wording is broad, embracing every act of obedience, whether its type is obligatory or not (5), and fulfilling the vow by visiting the superior mosque accords (6) with the relevant ḥadiths.
A detailed discussion of these questions is not intended here. The purpose is only to affirm that travel (7) is not legislated to any mosque other than these three. Even if one were to vow such travel, fulfilling the vow would not be required (8) by consensus of the leading jurists.