What factors explain attacks on humanitarian aid workers? Most research has tended to describe trends rather than analyse the underlying reasons behind attacks. To move this agenda forward, we present to our knowledge the first peer-reviewed cross-national time-series study that identifies factors related to violent attacks on humanitarian aid workers. Our theoretical framework explores two sets of potential explanatory factors: dynamics of conflicts; and the politicization and militarization of humanitarian operations. Using a global sample at the country-level from 1997-2014, our results suggest that: (i) the presence and severity of armed conflicts are related to increased attacks on aid workers; (ii) aid workers do not appear to face greater risks even where civilians are targeted; (iii) the presence of an international military force does not appear to add to nor decrease risks to aid workers; and (iv) the effects of peacekeeping operations upon humanitarian security are varied. We discuss this in light of the ongoing challenges facing humanitarian organisations to provide security in fragile and conflict-affected areas.