At the time of Muhammad (CE 570-632), his tribe the Quraysh was in charge of the Kaaba, which was at that time a shrine containing hundreds of idols representing Arabian tribal gods and other religious figures, including Jesus and Mary. Muhammad earned the enmity of his tribe by claiming the shrine for the new religion of Islam that he preached. He wanted the Kaaba to be dedicated to the worship of the one God alone, and all the idols evicted. The Quraysh persecuted and harassed him continuously[27], and he and his followers eventually migrated to Medina in 622.
After this pivotal migration, or Hijra, the Muslim community became a political and military force. In 630, Muhammad and his followers returned to Mecca as conquerors, and he destroyed the 360 idols in and around the Kaaba.[28][29] While destroying each idol, Muhammad recited [Qur'an 17:81] which says "Truth has arrived and falsehood has perished for falsehood is by its nature bound to perish."[28][29]
The Kaaba was re-dedicated as an Islamic house of worship, and henceforth, the annual pilgrimage was to be a Muslim rite, the Hajj, which visits the Kaaba and other sacred sites around Mecca.[30] Islamic histories also mention a reconstruction of the Kaaba around 600. A story found in Ibn Ishaq's Sirat Rasūl Allāh, one of the biographies of Muhammad (as reconstructed and translated by Guillaume), describes Muhammad settling a quarrel between Meccan clans as to which clan should set the Black Stone cornerstone in place. According to Ishaq's biography, Muhammad's solution was to have all the clan elders raise the cornerstone on a cloak, and then Muhammad set the stone into its final place with his own hands.[31][32][33] Ibn Ishaq says that the timber for the reconstruction of the Kaaba came from a Greek ship that had been wrecked on the Red Sea coast at Shu'ayba, and the work was undertaken by a Coptic carpenter called Baqum.[34]
It is also claimed by the Shīʿa that the Kaaba is the birth place of ʿAlī ibn Abī Tālib, the fourth caliph and cousin and son-in-law of the Islamic prophet Muhammad