Does U.S. military aid make the United States safer? Or does it have unintended consequences for U.S. security? By exploiting plausibly exogenous time variation in global levels of U.S. military aid and cross-national time-series variation in the relative importance of the various military aid programs for recipient countries, we provide causal estimates of the effect of U.S. military aid on anti-American terrorism for 174 countries in 1968-2018. Higher levels of military aid increase the likelihood of anti-American terrorism in recipient countries. At the sample mean, doubling U.S. military aid increases the risk of anti-American terrorism by 12.9 percentage points. Regarding potential transmission channels, more U.S. military aid leads to more corruption and exclusionary policies. That is, U.S. military aid results in anti-American terrorism by undermining institutions in recipient countries, thus creating anti-American resentment among those parts of the population that do not have access to the benefits from military aid.