Sahih Muslim Book 007, Hadith Number 3083.

Chapter : The demolishing of the ka'ba and its reconstruction.

'Ata' reported: The House was burnt during the time of Yazid b. Muawiya when the people of Syria had fought (in Mecca). And it happened with it (the Ka'ba) what was (in store for it). Ibn Zubair (Allah be pleased with him) felt it (in the same state) until the people came in the season (of Hajj). (The idea behind was) that he wanted to exhort them or incite them (to war) against the people of Syria. When the people had arrived he said to them: O people, advise me about the Ka'ba. Should I demolish it and then build it from its very foundation, or should I repair whatever has been damaged of it? Ibn 'Abbas said: An idea has occurred to me according to which I think that you should only repair (the portion which has been) damaged, and leave the House (in that very state in which) people embraced Islam (and leave those very stones in the same state) when people embraced Islam, and over which Allah's Apostle (may peace be upon him) had raised it. Thereupon Ibn Zubair said: It the house of any one of you is burnt, he would not be contented until he had reconstructed it, then what about the House of your Lord (which is far more Important than your house)? I would seek good advice from my Lord thrice and then I would make up (my mind) about this affair. After seeking good advice thrice, he made up his mind to demolish it. The people apprehended that calamity might fall from heaven on those persons who would be first to climb (over the building for the purpose of demolishing it), till one (took up courage, and ascended the roof), and threw down one of its stones. When the people saw no calamity befalling him, they followed him, demolished it until it was razed to the ground. Then Ibn Zubair erected pillars and hung curtains on them (in order to provide facilities to the people for observing the time of its construction). And the walls were raised; and Ibn Zubair said: I heard 'Aisha (Allah be pleased with her) say that Allah's Apostle (may peace be upon him) had observed: If the people had Rot recently (abandoned) unbelief, find I had means enough to reconstruct it, which I had not, I would have definitely encompassed in it five cubits of area from Hijr. And I would also have constructed a door for the people to enter, and a door for their exit. I today have (the means to spend) and I entertain no fear from the side of people (that they would protest against this change). So he added five cubits of area from the side of Hatim to it that there appeared (the old) foundation (upon which Hadrat Ibrahim had built the Ka'ba) and the people saw that and it was upon this foundation that the wall was raised. The length of the Ka'ba was eighteen cubits, when addition was made to it (which was in its breadth), then naturally the length appears to be) small (as compared with its breadth). Then addition of ten cubits (of area) was made in its length (also). Two doors were also constructed, one of which (was meant) for entrance and the other one for exit. When Ibn Zubair (Allah be pleased with him) was killed, Hajjaj wrote to 'Abd al-Malik (b. Marwan) informing him about it, and telling him that Ibn Zubair (Allah be pleased with him) had built (the Ka'ba) on those very foundations (which were laid by Ibrahim) and which reliable persons among the Meccans had seen. 'Abd al-Malik wrote to him: We are not concerned with the censuring of Ibn Zubair in anything. Keep intact the addition made by him in the side of length, and whatever he has added from the side of Hijr revert to (its previous) foundation, and wall up the door which he had opened. Thus Hajjaj at the command of Abd al-Malik) demolished it (that portion) and rebuilt it on (its previous) foundations.

Related Hadith(s)