It was after the Babylonian captivity (not later than the 5th cent. B.C.) that a compilation of earlier texts and oral traditions was made, forming the canon of the Torah, the Five Books of Moses. Subsequently 34 other books were added to form the Hebrew Bible or Old Testament, though the canon was not finalized until perhaps as late as the 2d cent. A.D. The Torah was traditionally attributed to Moses, and study of the Torah was accompanied by expositions and explanations in which the Oral Law, as distinct from the Written Law (the Torah text), is rooted. While it is widely held that the Pharisees further developed the Oral Law, in opposition to the literalness of the Sadducees, it is inconceivable that the latter group could have administered the biblical laws without reinterpreting them in accordance with a changing world, or in the face of a lack of specificity in the text.
The Babylonian exile had exposed the Israelites to new ideas, and it is to that period that the notions of identifiable angels (such as Michael and Raphael), of the personification of evil (Satan), and of the resurrection of the dead can probably be traced. The conquests of Alexander the Great once again brought the Jews into contact with new ideas, most significantly that of the immortality of the soul. Conflict arose within the community of Israel concerning the level of Hellenization acceptable, out of which came the revolt of the Maccabees against the Seleucid rulers of Syria and their Judean sympathizers. The resulting martyrdom of many gave added impetus to the belief in collective resurrection of the dead and the immortality of the soul after the body's death. These concepts were wed in such a way that while the body awaited its resurrection, the soul was seen as living on in another realm. This new development in no way supplanted the earlier notion of earthly reward; life on earth, however, was viewed by many as preparatory for the next.
As the conditions of life deteriorated, apocalyptic beliefs grew—national catastrophe and the messianic kingdom were seen as imminent events. Some groups (see Essenes; Qumran) fled into the desert to lead righteous lives in anticipation, while others followed claimants to the mantle of Messiah (most notably Jesus). Out of these numerous ingredients came both Christianity and classical, or rabbinic, Judaism.