"Then Solomon began to build the Temple of the Lord in Jerusalem on Mount Moriah. It was on the threshing-floor of Araunah the Jebusite, the place provided by David, his father."
– 2 Chronicles 3:1
Wikipedia:
Here King Solomon built the First Temple almost 3,000 years ago. It was destroyed by the Babylonians in 586 BCE, but, 70 years later, Jews returning from exile built the Second Temple on the same site. King Herod began remodeling the building in 19 BCE, but it was not completed until 63 CE, long after his death at the beginning of the century.
In reaction to the “Great Revolt” in 70 CE, the temple was destroyed by the Romans and deliberately left in ruins. When the Romans razed the Temple, they left one outer wall standing. They probably would have destroyed that wall as well, but it must have seemed too insignificant to them since it was not part of the Temple itself, just a retaining wall surrounding the Temple Mount.
After the suppression of the revolt, Jews were allowed to pray on the ruins and to bring sacrifices on the alter that remained after the temple was burned down. The Emperor Hadrian later gave Jews permission to rebuild the temple but changed his mind. After the Bar-Kokhba rebellion, Hadrian barred Jews from the area and they prayed instead on the Mount of Olives that overlooked the Temple Mount.
There is some evidence the Byzantines may have built a church on the Temple Mount at one point but the prohibition on Jews praying there remained under the Emperor Constantine, who allowed them access only on Tisha B’Av. When his nephew Julian became emperor in 361, Jews were again allowed to visit the Temple Mount and were even given permission to rebuild the temple. When Julian died two years later, however, his successor canceled the project and Christian opposition to a Jewish presence continued throughout the Byzantine period.
At various times Jews may have been allowed to pray on the Temple Mount but, wherever they lived, Jews would pray three times a day in the direction of the Temple Mount for the temple’s restoration.
Following the Muslim conquest of Jerusalem in May 638, which Jews supported, Caliph Omar ibn al-Khattab ordered the clearing of the site and the building of a house of prayer. The Temple Mount was again opened to Jewish worshippers.
In 680, the Muslims built the Dome of the Rock to enshrine the outcrop of bedrock believed to be the place of the sacrifice on Mount Moriah. Nadav Shragai quotes Professor Dan Bahat who found “‘it was the Jewish elders who showed the Muslims the boundaries of the Foundation Stone,’ which was covered with garbage and sewage – boundaries from which the Muslims derived the dimensions of the Dome of the Rock, which was built above the ancient Rock.”
... and more...