Under what conditions does religion become a salient social identity? By measuring religious attachment among the people living astride the Burkina Faso–Côte d’Ivoire border in West Africa, an arbitrary boundary that exposes otherwise similar individuals to different political contexts, this article makes a case for the importance of the political environment in affecting the weight that people attach to their religious identities. After ruling out explanations rooted in the proportion of different religious denominations, the degree of secularization and the supply of religious institutions on either side of the border, as well as differences in the degree of religious pluralism at the national level, it highlights the greater exposure of Ivorian respondents to the politicization of religion during Côte d’Ivoire’s recent civil conflict. Methodologically, the study demonstrates the power – and challenges – of exploiting Africa’s arbitrary borders as a source of causal leverage.