Following the allocation that had been made previously, each tribe individually gathered stones and began to build their section of the Ka‘bah. When the reconstruction was complete and it was time to insert the Hajr-e-Aswad (black stone) into its place, then a great dispute arose. Swords were unsheathed and people were prepared to fight and kill one another to acquire the honor of raising the stone to its place.
After four or five days passed in this state with no decision being made, Abu Umayyah bin Mugheerah Makhzoomi, one of the eldest members of the Quraish, suggested that the decision be made by the first person to enter the doors of the Haram the next morning. Everybody was pleased with this suggestion.
(Extracted from Seeratul Mustafa 1/115)