obligatory to perform Hajj in the early days of Islam; it became obligatory only through Allah Most High’s words in Sūrat Āl ‘Imrān:
“Pilgrimage to the House is a duty owed to Allah by mankind.”
Muslims agree that this establishes its obligation. As for His words:
“Complete Hajj and ‘umrah for Allah,”
some have said that this makes both undertaking them in the first place and completing them once begun obligatory. Others have said that it establishes only the obligation to complete them once begun, not an obligation to undertake them in the first place. This is the correct view, for everyone agrees that this verse was revealed in the year of al-Hudaybiyah, after the Prophet, peace and blessings be upon him, had begun his ‘umrah—the ‘umrah of al-Hudaybiyah—when the polytheists prevented him from proceeding. The verse permitted anyone prevented from proceeding to leave the state of ritual consecration. Thus, when the polytheists barred the Prophet, peace and blessings be upon him, and his Companions, they left that state and returned.
The imams agree that anyone who begins Hajj or ‘umrah must complete it. They differed, however, concerning fasting, prayer, and spiritual retreat, holding two well-known positions. The position of al-Shāfi‘ī and, according to the well-known report from him, Ahmad is that completion is not obligatory. The position of Mālik and Abū Hanīfah is that it is obligatory, as explained at length elsewhere.
The point is that the merit of travelling to the Messenger’s Mosque lies in worshipping there, and that a prayer there is worth a thousand prayers. None of this is on account of the grave, by the consensus of the Muslims. This is among the distinctions between the Mosque of the Messenger, peace and blessings be upon him, and other mosques, and between his grave and other graves. The difference has thus become clear in several respects.