One of the greatest challenges of the twenty-first century is to ensure that the world population has reliable access to adequate, affordable and nutritious food sufficient to avoid hunger. Agricultural trade liberalization is often considered a central element of economic strategies aiming at improving food security in developing countries. Many, however, argue that most developing countries may not benefit from freer agricultural trade and that liberalization may accentuate food insecurity. From an empirical perspective, little is known about the effects of trade on food security in developing countries. We estimated the effects of food trade openness on extreme hunger in developing countries using a novel two-step approach. First, we estimated the reverse causal impacts of hunger on food trade openness using rainfall anomalies as instrumental variables to generate exogenous variation in hunger. In a second step, we estimated the effect of food trade openness on hunger using the residual food trade openness that is not driven by hunger as an instrument. We found that a 10% increase in food trade openness would increase the prevalence of undernourishment by about 6%. We also found evidence that developing countries reduce food trade openness as a response to increased hunger, suggesting protectionist policies. A percentage point increase in undernourishment prevalence would decrease food trade openness by 0.9%. Our results suggest that countries may be better off adopting food self-sufficiency for some time, despite such actions clashing with World Trade Organization's regulations and current agenda.