It had been the site of the Second Jewish Temple (c.516BCE) that was built to replace Solomon's Temple (between 10th and 6th centuries BCE). The Second Jewish Temple had been destroyed by the Romans in 70CE. The 5th Umayyad Caliph built on that site the Qubbat aṣ-Ṣaḵra, the Dome of the Rock, the oldest surviving work of Islamic architecture. The leaders of the Crusade in 1099 called it the Templum Domini, the "Temple of the Lord," and handed the management of it over to the Augustinians.
The actual rock was originally left exposed, but later covered with white marble. In 1138 the Temple Domini was given the status of an abbey. A few years later, on 1 April 1141, the church was dedicated by the papal legate Alberic of Ostia (on pilgrimage there with Armenian Catholicos Grigor III Pahlavuni).
An adjacent mosque became a royal palace for the King of Jerusalem and the image of the dome became an important symbol of the Jerusalem royalty. When a new royal palace was built, the old palace became the local headquarters of the Knights Templar, who provided protection to pilgrims. The design of the Dome of the Rock became copied by the Templars for their round churches across Europe.
The general shape has not changed over 13+ centuries. It is an octagonal structure with a dome. It displays the earliest public inscriptions of the sayings of Islam and Muhammad. The traveler Ibn Battuta in 1326 said:
Any viewer's tongue will grow shorter trying to describe it. This is one of the most fantastic of all buildings, of the most perfect in architecture and strangest in shape.
It is still one of the most visited places on earth.
This is the second time that the papal legate Alberic of Ostia has appeared (although in reference to the same event), and I'd like to look at his life and travels next time.