Economic development has been linked to a declining importance of religion. But alongside secularization, there has been an increased salience of religion in electoral politics. These seemingly contradictory trends can be understood by distinguishing between two dimensions of religiosity: religious belief and church attendance. We show that religious voting cleavages are strongest in democracies where there is religious cohesion, which means belief and practice go hand in hand. Voting cleavages require group members to have distinctive policy preferences and be politically engaged. Strong religious beliefs are associated with distinctive policy preferences (but not with political engagement), and church attendance is associated with political engagement. Thus, religious cohesion provides the key ingredients for a religious political cleavage. But what explains variation in religious cohesion in democracies? We find that religious cohesion increases with economic security. Thus, economic security can promote secularization, but also facilitate the religious cohesion associated with strong religious voting cleavages.