In 586 B.C., Judah was conquered by Nebuchadnezzar and exiled to Babylon. The prophets are clear: Judah, and Israel before her, suffered for their sins. Then the captivity ends. Cyrus, ruler of the Persian empire, allows the exiles to return to Jerusalem and rebuild the temple. The restoration of the kingdom was on the way.
More than 300 years later, the Seleucid empire tried to make the Jews into Greeks by force, outlawing Sabbath observance, circumcision, and the reading of the Torah. The Greeks went so far as to sacrifice a pig on the altar in Jerusalem.
A revolt was led by a priest named Mattathias the Hasmonean and his sons starting in 167 B.C. They were victorious and reclaimed the temple for God, rededicating it on the 25th of Kislev (1 Macc 4:52). The Hasmoneans, who called themselves the Maccabees — that is, the Hammers — ruled restored Israel for about one hundred years. (If you’re wondering when the miracle of the oil happened, no such miracle is recorded in the four books of the Maccabees. The story of the oil only appears in the Talmud 600 years later.)
The Maccabees believed that they were bringing about the final redemption of Israel. Assuming they were living in the messianic age, they expanded Jewish territory by force, converting those around them. They also changed how the priestly succession worked in the temple, leading to the temple corruption depicted in the Gospels. The Hasmonean Dynasty eventually descended into civil war, leading to Rome’s conquest of Jerusalem in 63 B.C.