Although its definitive date of origin is difficult to establish, many believe that Ibrahim (Abraham in the Christian tradition) built the Kaaba, which began as a simple rectangular structure without a roof. In c. 608, the ruling tribe of Mecca, the Quraysh, rebuilt the building in masonry and wood.
When Muhammad returned to Mecca in 629/30, the Kaaba became the focus for pilgrimage and prayer. The Quran established the Kaaba as the qibla (or direction) towards which Muslims must address their five daily prayers, and as the destination of the hajj. Muhammad is said to have cleared the Kaaba of idols upon his victorious return to Mecca, so the shrine was dedicated to one god as it had been in the time of Ibrahim. The building contained Al-Hajar al-Aswad (the Black Stone), believed to have been given to Ibrahim by the angel Gabriel and revered by Muslims. Muhammad made a final pilgrimage to Mecca in 632, the year of his death, establishing the rites of pilgrimage and importance of the Kaaba.
Since the beginning of Islam, the Kaaba and its surroundings have been modified many times. The caliph Umar (ruled 634–44 CE) expanded the area around the Kaaba in order to accommodate the increasing number of pilgrims. During the caliph Uthman’s rule (644–56 CE), the colonnades around the open plaza where the Kaaba stands were built.
During the civil war between Ibn Zubayr, who controlled Mecca, and the caliph Abd al-Malik, the Kaaba was damaged by fire in 683. Al-Hajar al-Aswad is said to have broken into three pieces and Ibn Zubayr then reassembled it with silver. He rebuilt the Kaaba in wood and stone, following dimensions believed to be set by Ibrahim, and paved the space around the Kaaba. After regaining control of Mecca in 692, Abd al-Malik demolished the Kaaba and rebuilt it based on the Quraysh version.
Under the early Abbasid caliphs (750–1250), the mosque around the Kaaba was expanded and modified several times. From 1269–1517, the Mamluks of Egypt controlled the Hijaz, the region where Mecca is located. Sultan Qaitbay built a madrasa (a religious school) against one side of the mosque.
Following Mamluk rule, Mecca came under the control of the Ottoman Sultans. In 1553, Sultan Süleyman I renovated the roof of the Kaaba, and ordered that the wooden ceiling be painted with golden calligraphy and floral patterns. Damaged by a flood in 1611, the Kaaba was rebuilt by Sultan Murad IV in 1629. The new foundation was laid according to Abraham’s plan, while the upper structure was built with large granite blocks resting on a marble base.
Today, the Kaaba stands near the centre of the Masjid al-Haram, the Great Mosque that has grown over the centuries to cover around 40 acres. Around 15 metres tall and 10.5 metres wide on each side, the cube-like structure is covered in a vast brocaded cloth, the kiswah. On the southwest side of the Kaaba is a semi-circular wall, a little over a metre tall, which represents its border as built by Ibrahim. Embedded in the eastern corner, Al-Hajar al-Aswad is one-and-a-half metres above the ground. For much of its history, Muslims have considered it the holiest place on Earth.