Ibn Isḥāq said: In the Prophet’s time ﷺ the Kaʿbah was eighteen cubits high. It used to be covered with qibāṭī, a fine Egyptian linen, and afterwards with striped cloaks (burūd). The first person to clothe it in silk brocade was al-Ḥajjāj ibn Yūsuf.
I say: They also left the Hijr—six or seven cubits on the Syrian side—outside the structure because their funds fell short; that is, they were unable to build upon the foundations laid by Abraham. They gave the Kaʿbah a single door on the eastern side and raised it above the ground so that not everyone could enter; they would admit whomever they pleased and bar whomever they pleased.
It is authentically reported in the two Ṣaḥīḥs, from ʿĀʾishah (may Allah be pleased with her), that the Messenger of Allah ﷺ said to her:
“Have you not seen that your people lacked sufficient means? Had it not been that your people have only recently left disbelief, I would have dismantled the Kaʿbah, given it an eastern door and a western door, and brought the Hijr within it.”
Accordingly, when Ibn al-Zubayr gained control he rebuilt it exactly as the Messenger of Allah ﷺ had indicated. The building reached the height of splendor, beauty, and magnificence, complete upon the foundations of the Friend (Abraham). It had two doors level with the ground, one to the east and one to the west; people would enter through one and leave through the other.
When al-Ḥajjāj killed Ibn al-Zubayr he wrote to ʿAbd al-Malik ibn Marwān—who was then the caliph—about what Ibn al-Zubayr had done, assuming that he had acted on his own initiative. ʿAbd al-Malik ordered that it be returned to its former state. They therefore went to the northern wall, dismantled it, removed the Hijr, and laid its stones in the floor of the Kaʿbah. The door was once again raised high, the western door was sealed, and the eastern door remained as it had been.
Later, in the reign of al-Mahdī—or his son al-Manṣūr—the caliph sought the opinion of Mālik (may Allah have mercy on him) about restoring it to the form built by Ibn al-Zubayr. Mālik replied, “I dislike that the kings should treat it as a plaything,” and so it was left as it is. It remains so to this day.
As for the Sacred Mosque, the first to push back the surrounding houses was ʿUmar ibn al-Khaṭṭāb (may Allah be pleased with him); he purchased them from their owners and demolished them. During the caliphate of ʿUthmān he bought additional houses and added their land to the precinct. When Ibn al-Zubayr came to power, he strengthened the work.