In the Fourth Century, after the Church took over the Empire, the Christian rulers thought of a graphic way to demonstrate Justin Martyr's claim that God's covenants were under new management. They began forcing the Jerusalem residents to dump their daily garbage on the Temple Mount.
When the Moslems took Jerusalem in 638, the Omayyad caliph Abd al-Malik wanted to build a monument on the Temple Mount, but the mountain of rotting refuse rose so high and spread so far that they could not find the ruins of the Temple. An old Jew living nearby promised to show him the exact spot if the caliph would swear to preserve the Western Wall. "So the king straightway put his hand on the thigh of the old man and swore by oath to do what he demanded." The caliph personally helped clean up the ruins and then built the Dome of the Rock directly over the spot the old man pointed out.
Hammer, Reuven. The Jerusalem Anthology. The Jewish Publication Society, Philadelphia, 1995.