The origins of Judaism lie in the Bronze Age amidst polytheistic ancient Semitic religions, specifically Canaanite religion, co-existing with a syncretization with elements of Babylonian religion and of the worship of Yahweh reflected in the early prophetic books of the Hebrew Bible. During the Iron Age I, the Israelite religion became distinct from other Canaanite religions due to the unique monolatristic (proto-monotheistic) worship of Yahweh. During the Babylonian captivity of the 6th and 5th centuries BCE (Iron Age II), certain circles within the exiled Judahites in Babylon refined pre-existing ideas about monotheism, election, divine law and Covenant into a strict monotheistic theology which came to dominate the former Kingdom of Judah in the following centuries. From the 5th century BCE until 70 CE, Israelite religion developed into the various theological schools of Second Temple Judaism, besides Hellenistic Judaism in the diaspora. Second Temple eschatology was significantly influenced by Zoroastrianism. The text of the Hebrew Bible was redacted into its extant form in this period and possibly also canonized as well. Rabbinic Judaism developed during Late Antiquity, during the 3rd to 6th centuries CE; the Masoretic Text of the Hebrew Bible and the Talmud were compiled in this period. The oldest manuscripts of the Masoretic tradition come from the 10th and 11th centuries CE; in the form of the Aleppo Codex of the later portions of the 10th century CE and the Leningrad Codex dated to 1008–1009 CE. Due largely to censoring and the burning of manuscripts in medieval Europe the oldest existing manuscripts of various rabbinical works are quite late. The oldest surviving complete manuscript copy of the Babylonian Talmud is dated to 1342 CE.
Judaism has its origins in the Iron Age Kingdom of Judah and in Second Temple Judaism. It has three essential and related elements: study of the written Torah (the books of Genesis, Exodus, Leviticus, Numbers, and Deuteronomy); the recognition of Israel (defined as the descendants of Abraham through his grandson Jacob) as a people elected by God as recipients of the law at Mount Sinai, his chosen people; and the requirement that Israel live in accordance with God's laws as given in the Torah.
The Iron Age kingdoms of Israel (or Samaria) and Judah first appear in the 9th century BCE. The two kingdoms shared Yahweh as their national god, for which reason their religion is commonly called Yahwism. Neighbouring kingdoms of the time each had their own national gods: Chemosh was the god of Moab, Moloch the god of the Ammonites, Qaus the god of the Edomites, and so on, and in each kingdom the king was his god's viceroy on Earth. The various national gods were more or less equal, reflecting the fact that kingdoms themselves were more or less equal, and within each kingdom a divine couple, made up of the national god and his consort – Yahweh and the goddess Asherah in Israel and Judah – headed a pantheon of lesser gods.
By the late 8th century both Judah and Israel had become vassals of Assyria, bound by treaties of loyalty on one side and protection on the other. Israel rebelled and was destroyed c. 722 BCE, and refugees from the former kingdom fled to Judah, bringing with them the tradition that Yahweh, already known in Judah, was not merely the most important of the gods, but the only god who should be served. This outlook was taken up by the Judahite landowning elite, who became extremely powerful in court circles in the next century when they placed the eight-year-old Josiah (reigned 641–609 BC) on the throne. During Josiah's reign Assyrian power suddenly collapsed, and a pro-independence movement took power promoting both the independence of Judah from foreign overlords and loyalty to Yahweh as the sole god of Israel. With Josiah's support the "Yahweh-alone" movement launched a full-scale reform of worship, including a covenant (i.e., treaty) between Judah and Yahweh, replacing that between Judah and Assyria.
By the time this occurred, Yahweh had already been absorbing or superceding the positive characteristics of the other gods and goddesses of the pantheon, a process of appropriation that was an essential step in the subsequent emergence of one of Judaism's most notable features, its uncompromising monotheism. The people of ancient Israel and Judah, however, were not followers of Judaism: they were practitioners of a polytheistic culture worshiping multiple gods, concerned with fertility and local shrines and legends, and not with a written Torah, elaborate laws governing ritual purity, or an exclusive covenant and national god.
In 586 BCE Jerusalem was destroyed by the Babylonians, and the Judean elite – royal family, the priests, the scribes and other members of the elite – were taken to Babylon in captivity. They represented only a minority of the population, and Judah, after recovering from the immediate impact of war, continued to have a life not much different from what had gone before. In 539 BCE Babylon fell to the Persians and the Babylonian exile ended and a number of the exiles, but by no means all and probably a minority, returned to Jerusalem. They were the descendants of the original exiles, and had never lived in Judah; nevertheless, in the view of the authors of the Biblical literature, they, and not those who had remained in the land, were "Israel". Judah, now called Yehud, was a Persian province, and the returnees, with their Persian connections in Babylon, were in control of it. They represented also the descendants of the old "Yahweh-alone" movement, but the religion they instituted was significantly different from both monarchic Yahwism and modern Judaism. These differences include new concepts of priesthood, a new focus on written law and thus on scripture, and a concern with preserving purity by prohibiting intermarriage outside the community of this new "Israel".
The Yahweh-alone party returned to Jerusalem after the Persian conquest of Babylon and became the ruling elite of Yehud. Much of the Hebrew Bible was assembled, revised and edited by them in the 5th century BCE, including the Torah (the books of Genesis, Exodus, Leviticus, Numbers, and Deuteronomy), the historical works, and much of the prophetic and Wisdom literature. The Bible narrates the discovery of a legal book in the Temple in the seventh century BCE, which the majority of scholars see as some form of Deuteronomy and regard as pivotal to the development of the scripture. The growing collection of scriptures was translated into Greek in the Hellenistic period by the Jews of the Egyptian diaspora, while the Babylonian Jews produced the court tales of the Book of Daniel (chapters 1–6 of Daniel – chapters 7–12 were a later addition), and the books of Tobit and Esther.
Other scholars contend that the development of a strict monotheism was the result of cultural diffusion between Persians and Hebrews. While (in practice) dualistic, Zoroastrianism believed in eschatological monotheism (i.e. only one god in the end). Some suggest that it is not merely coincidence that Zoroastrianism's model of eschatological monotheism and the Deuteronomic historians' strictly monotheistic model receive formative articulations during the period after Persia overthrew Babylon.
Second Temple Judaism was divided into theological factions, notably the Pharisees and the Sadducees, besides numerous smaller sects such as the Essenes, messianic movements such as Early Christianity, and closely related traditions such as Samaritanism (which gives us the Samaritan Pentateuch, an important witness of the text of the Torah independent of the Masoretic Text).
During the 2nd to 1st centuries BCE, when Judea was under Seleucid and then Roman rule, the genre of apocalyptic literature became popular, the most notable work in this tradition being the Book of Daniel.
For centuries, the traditional understanding has been that Judaism came before Christianity and that Christianity separated from Judaism some time after the destruction of the Second Temple in 70 CE. Starting in the latter half of the 20th century, some scholars have begun to argue that the historical picture is quite a bit more complicated than that. In the 1st century, many Jewish sects existed in competition with each other, see Second Temple Judaism. The sects which eventually became Rabbinic Judaism and Early Christianity were but two of these. Some scholars have begun to propose a model which envisions a twin birth of Christianity and Judaism rather than a separation of the former from the latter. For example, Robert Goldenberg (2002) asserts that it is increasingly accepted among scholars that "at the end of the 1st century CE there were not yet two separate religions called "Judaism" and "Christianity"". Daniel Boyarin (2002) proposes a revised understanding of the interactions between nascent Christianity and nascent Rabbinical Judaism in Late Antiquity which views the two religions as intensely and complexly intertwined throughout this period.
The Amoraim were the Jewish scholars of Late Antiquity who codified and commented upon the law and the biblical texts. The final phase of redaction of the Talmud into its final form took place during the 6th century CE, by the scholars known as the Savoraim. This phase concludes the Chazal era foundational to Rabbinical Judaism.