This article provides an empirical investigation of the determinants of terrorism at the country level. In contrast with the previous literature on this subject, which focuses on transnational terrorism only, I use a new measure of terrorism that encompasses both domestic and transnational terrorism. In line with the results of some recent studies, this article shows that terrorist risk is not signifcantly higher for poorer countries, once the effects of other country-specific characteristics such as the level of political freedom are taken into account. Political freedom is shown to explain terrorism, but it does so in a non-monotonic way: countries in some intermediate range of political freedom are shown to be more prone to terrorism than countries with high levels of political freedom or countries with highly authoritarian regimes. This result suggests that, as experienced recently in Iraq and previously in Spain and Russia, transitions from an authoritarian regime to a democracy may be accompanied by temporary increases in terrorism. Finally, the results suggest that geographic factors are important to sustain terrorist activities.