Persian rule

The exiled Jews were permitted to retain their national and religious identity. Some of their  theological writings and many historical books of the Old Testament were written during their exile period. When Cyrus the Great of Persia conquered Babylonia in 539 BC, he permitted them to return to Judea, a district of Palestine; under Persian rule, the Jews were allowed a considerable measure of autonomy. They rebuilt the walls of Jerusalem and codified the Mosaic law, the Torah, which became the code of social life and religious observance.

Persia ruled in Palestine until the country was captured by Alexander the Great in 333BC. His successors -- the Egyptian Ptolemies and the Syrian Seleucids -- tried without success to force Greek culture and religion on the people.

Eventually in the second century BC, the Jews revolted and established an independent state (141-63BC). This lasted until Pompey the Great conquered Palestine for Rome and made it a province of the Roman Empire ruled by Jewish kings.