'God from the machine' (deus ex machina) refers to an ancient dramatic device where a god was mechanically brought onto the stage to save the hero from a difficult situation. But here, William Sims Bainbridge uses the term in a strikingly different way. Instead of looking to a machine to deliver an already known god, he asks what a computing machine and its simulations might teach us about how religion and religious beliefs come to being. Bainbridge posits the virtual town of Cyburg, population 44,100. Then, using rules for individual and social behavior taken from the social sciences, he models a complex community where residents form groups, learn to trust or distrust each other, and develop religious faith. Bainbridge's straightforward arguments point to many more applications of computer simulation in the study of religion. God from the Machine will serve as an important text in any class with a social scientific approach to religion.