What makes countries susceptible to acts of religious terrorism? When are religious actors more likely to take up the gun? In this study, I argue that, contrary to the conventional wisdom, religious terrorism is not primarily the result of poverty, psychological alienation or foreign occupation, but rather a natural consequence of states that repress the religious and political rights of religious groups and individuals. Religious terrorism stems centrally from regimes that deny religious freedom to their people. I argue for the strong effect of regime structure which, all else being equal, is likely to encourage or discourage religious terrorism depending on the level of religious freedom that it allows. When religiously devout people find themselves excluded and marginalized through law and repression, they are much more likely to pursue their aims through violence. By contrast, religiously-free countries — states that protect both the religious rights of individuals or communities to manifest religion or belief in teaching, practice, worship and observance and the political rights of these groups to run for office and otherwise participate in politics — individuals and groups are free to influence state policy through institutional means including persuasion, ideological influence, and electoral power. I test these claims using a statistical analysis of an original dataset on religious terrorism and through several country case studies.