According to the Hebrew Bible, the First Temple of Jerusalem was built by King Solomon in 957 BC. It replaced the Tabernacle and local sanctuaries and altars that were constructed under Moses, described in the Book of Deuteronomy. The Temple was sacked by the Egyptian pharoah, Shishak, (Shoshenq I?), a few decades later, as detailed in the Book of Kings and Book of Chronicles. This is a category of temple coins
The Temple saw various reconstruction efforts, but it wasn’t until Jehoash, King of Judah, invested considerable funds in 835 BC to see it seriously rebuilt. The Temple remained intact until c.700 BC when the Assyrian King, Sennacherib, stripped it once again and in 586 BC, the Temple was completely destroyed when the Babylonians sacked the city.
The Babylonian Empire fell in 539 BC and per the Book of Ezra, Cyrus the Great, the founder of the Persian Achaemenid Empire, began construction of the Second Temple in 538 BC. Cyrus believed in maintaining the local culture, customs and religions of the territories he conquered. The Temple took 23 years to complete and was dedicated on March 12, 515 BC by the Jewish governor, Zerubbabel, during the sixth regnal year of Darius the Great.
In 332 BC, the Jews refused to acknowledge the deification of Alexander III the Great, which could have brought down the Temple once again through the wrath of the Macedonian. It is said that Alexander decided against exacting punishment through the use of flattery and diplomacy. Alexander died on June 13, 323 BC and the Ptolemies came to rule over Judaea. The Ptolemies continued to let the Jews live as they were, until the Seleukids, under Antiochos III the Great, defeated the Ptolemies at Paneion in 198 BC. Antiochos wanted to Hellenize the Jews and introduced the Greek pantheon to the Second Temple. A rebellion broke out and was crushed, but Antiochos didn’t respond further. Antiochos died in 187 BC and his son took over, but was assassinated a year later. Antiochos IV succeeded him and continued the Hellenization of their kingdom. The Jews once again rebelled, but Antiochos retaliated and went so far as to erect a statue of Zeus in the Temple and had priests began the customary ritual of sacrificing pigs to the gods. A Greek official commanded the priest, Mattathias ben Johanan, to perform the sacrifice and Mattathias refused and killed the official. In 167 BC, the Jews rallied behind Mattathias, and his five sons, against the Seleukids. The Maccabees were the leaders of the rebellion and began the Hasmonean Dynasty after the success of the struggle against Seleukid domination.
Judas Maccabaeus, son of Mattathias, restored and rededicated the Second Temple in Jerusalem on November 21, 164 BC. This event is commemorated each year by the eight-day festival of Hanukkah, which celebrates the miracle of the sacred oil lasting eight days in the menorah, when there was only enough for one during the rededication.