It is often thought that modern science developed largely independently of, or even in opposition to, religion. Some historians, however, have suggested that religious factors played a key role in the emergence of modern science in the seventeenth century, and were important in establishing a permanent and prominent place for scientific activity at the heart of modern Western culture. This lecture explores a number of ways in which religion may have had a positive impact on the emergence and consolidation of modern science, paying particular attention to the values needed to establish its social and intellectual legitimacy.