Understanding religion requires explaining why supernatural beliefs, devotions, and rituals are both universal and variable across cultures, and why religion is so often associated with both large-scale cooperation and enduring group conflict. Emerging lines of research suggest that these oppositions result from the convergence of three processes. First, the interaction of certain reliably developing cognitive processes, such as our ability to infer the presence of intentional agents, favors-as an evolutionary by-product-the spread of certain kinds of counterintuitive concepts. Second, participation in rituals and devotions involving costly displays exploits various aspects of our evolved psychology to deepen people's commitment to both supernatural agents and religious communities. Third, competition among societies and organizations with different faith-based beliefs and practices has increasingly connected religion with both within-group prosociality and between-group enmity. This connection has strengthened dramatically in recent millennia, as part of the evolution of complex societies, and is important to understanding cooperation and conflict in today's world.