Al-Bayhaqī next cites—in full—the lengthy ḥadīth of Ibn ʿAbbās concerning the story of Abraham (peace be upon him), which is recorded in Ṣaḥīḥ al-Bukhārī.
He then transmits, through the chain of Simāk ibn Ḥarb from Khālid ibn ʿArʿarah, that a man once asked ʿAlī about the Almighty’s words: “Indeed, the first House appointed for mankind was that at Bakkah, blessed and a guidance for all peoples” (Āl ʿImrān 3:96).
The man said, “Was that the very first house ever built on earth?”
ʿAlī replied, “No; rather, it is the first House in which blessing and guidance were placed for mankind—along with the Station of Abraham—and whoever enters it is safe. If you wish, I will tell you how it was built. Allah, Exalted is He, revealed to Abraham, ‘Build for Me a House on earth.’ The command weighed heavily upon him, so Allah sent down the sakīnah—a powerful, whirling wind with a distinct head. One gust followed the other until they reached the site, then they coiled around the location of the House like a serpent. There Abraham began building. When he reached the spot for the Stone he said to his son, ‘Bring me a stone.’ The boy went off in search of one and, on returning, found that the Black Stone had already been set in place. He asked his father, ‘Where did you get this?’ Abraham answered, ‘It was brought by One who does not rely on your workmanship—Gabriel came with it from heaven.’ And so Abraham completed the structure.
“Time passed and the building collapsed. The Amalekites rebuilt it; later it fell again and the tribe of Jurhum rebuilt it; then it collapsed once more and Quraysh rebuilt it while the Messenger of Allah (ﷺ) was still a young man. When Quraysh wished to raise the Black Stone, they quarreled over who should have the honor. They agreed to let the first man to come out of a certain alley settle the matter. The first to emerge was the Messenger of Allah (ﷺ). He ruled that the Stone be placed on a cloak, and that all the clans should lift it together.
Abū Dāwūd al-Ṭayālisī relates: Hammad ibn Salamah, Qays, and Salām all narrated to us from Simāk ibn Ḥarb, from Khālid ibn ʿArʿarah, from ʿAlī ibn Abī Ṭālib, who said: “After the House collapsed in the time of Jurhum, Quraysh rebuilt it. When they came to set the Stone in place they disputed over who should do it, and agreed that the first person to enter through this gate would assume the task. The Messenger of Allah (ﷺ) entered…”