Muslims affirm the duty of Hajj, pilgrimage to Mecca, once in a lifetime for every believer who is physically and financially able. It is the fifth Pillar, commanded in the Quran as a duty owed to God by those who can make the journey (3:97), and performed in the appointed days of the month of Dhu al-Hijjah. Its rites, circling the Kaaba, the running between Safa and Marwah, the standing at Arafat, the stoning at Mina, re-enact events the tradition associates with Abraham, his wife Hagar, and their son.
The tradition holds that Abraham and Ishmael built or rebuilt the Kaaba as a house of pure monotheism, and that by the time of Muhammad's mission it had become a shrine crowded with idols belonging to the pre-Islamic Arabian tribes who had long made pilgrimage to it for reasons predating Islam entirely; the Prophet's clearing of those idols after the conquest of Mecca is remembered as a restoration of the site's original purpose rather than the founding of something new. Distinctively, Islamic tradition names Ishmael, not Isaac, as the son Abraham was commanded to sacrifice, a divergence from the account in Genesis that is central to how Muslims understand their own descent from and connection to the patriarch, and it grounds the festival of Eid al-Adha, kept at the close of the Hajj, which commemorates that averted sacrifice with the ritual offering of an animal.