What is the impact of terrorism on trade through higher security at the borders? We set up a theory which shows that the impact goes not only from terrorism to trade; higher trade with a partner might, in turn, increase the probability of terrorism acts and make security measures more costly for total welfare. In order to identify the true impact of terrorism, our theory allows then for a strategy to condition out the latter mechanism. We show in particular how past incidents perpetrated in third countries (anywhere in the world except the origin or targeted country) constitute good exogenous factors for current security measures at the borders. Our tests suggest that terrorist incidents have a small effect on US imports on average, but a m...