Since the Middle Ages the Jews have been engaged primarily in urban, skilled occupations, such as crafts, trade, finance, and medicine. This distinctive occupational selection occurred between the seventh and the ninth centuries in the Muslim Empire and then it spread to other locations. We argue that this transition was the outcome of the widespread literacy among Jews prompted by an educational reform in the first century CE. Based on the growing nexus between education and Judaism in the first half of the millennium, we build a model in which Jewish men choose education, occupation, religion, and location. The model predicts that when urbanization expands (as it did in the Muslim Empire), Jews move to new cities due to their comparative advantage in urban, skilled occupations. Furthermore, before urbanization a proportion of Jewish farmers are predicted to convert to other religions. The predictions of the model regarding conversions, migrations, and reduction in the size of the Jewish population are consistent with the historical evidence about the first millennium provided by the historians. Hence, our study presents evidence for the long-term economic implications of changes in social norms.