During his stay in Jerusalem, Umar was led by Sophronius to various holy sites, including the Temple Mount. Seeing the poor state of where the Temple once stood, Umar ordered the area cleared of refuse and debris before having a wooden mosque built on the site. The earliest account of such a structure is given by the Gallic bishop Arculf, who visited Jerusalem between 679 and 682, and describes a very primitive house of prayer able to accommodate up to 3,000 worshippers, constructed of wooden beams and boards over pre-existing ruins.
More than half a century after the capture of Jerusalem, in 691, the Umayyad caliph Abd al-Malik commissioned the construction of the Dome of the Rock over a large outcropping of bedrock on the Temple Mount. The 10th-century historian al-Muqaddasi wrote that Abd al-Malik built the shrine in order to compete in grandeur with the city's Christian churches.
and after the Crusader conquest, this:
“The capture of Jerusalem by the Crusaders in 1099 marked an abrupt end to four and a half centuries of Muslim rule. The city would be back in Muslim hands within a century, but in a short period of time, Christian rule would dramatically reshape the city. The first priority was to embellish existing churches and to rededicate Islamic buildings to other uses. The Augustinian monastic order converted the Dome of the Rock into a church and Baldwin I of Edessa (reg. 1101 – 1118), the first monarch of the short-lived Christian kingdom, turned al-Aqsa Mosque into his palace.
Aren't the Muslims lucky the Jews now rule the city?