Humanitarian organizations are increasingly confronted with violence against aid workers. Although most attacks take place in countries experiencing violent conflict and are perpetrated by armed groups, non-conflict countries are also affected. Civilians can also be among the perpetrators. Understanding the dynamics that lead to attacks can help aid organizations in their operational decision-making process and limit the risks that their staff is exposed to. The theoretical framework of this dissertation covers the phenomenon comprehensively and is not limited to armed conflicts like previous studies on this topic. In addition, I consider a variety of perpetrators including government forces, non-state armed actors, and civilians, by highlighting individual motives behind such attacks. The causes behind these motives are also connected to the strategies of aid organizations. These strategies relate to how aid organizations uphold humanitarian principles and how they are perceived by others. Humanitarians are often feared because they are seen as politically motivated actors who secretly want to help the enemy. I evaluate this novel framework in four empirical chapters using multiple methods. First, a cross-national analysis assesses the overall validity of the theoretical framework in a comparative manner. I find that while political dynamics can affect the safety of aid workers, some of the aid agencies’ strategies can weaken or enhance their effect. Two different case studies consider in further detail how aid workers were perceived as political tools of the government during an epidemic and how they are associated with peacekeepers. Next, a mixed-method case study examines the extent to which the strategies of aid organizations can explain violence against Ebola responders during the 10th Ebola outbreak in the Democratic Republic of the Congo. Many attacks against the Ebola responders were perpetrated by ‘normal’ civilians and aimed at disrupting the response. Why would communities attack the very people who are trying to protect them from a disease? Using ‘explaining-outcome’ process tracing, I reconstruct key events that led to the violent resistance of the population. I find that, contrary to popular belief, a lack of aid localization alone was not the main driver. Rather, I argue that the large-scale violence was triggered when the population started to perceive Ebola as a political tool of the government. An interrupted time-series model then demonstrates that the exclusion of three regions from the presidential election due to Ebola resulted in a significant increase in attacks on Ebola responders. The two final empirical chapters show to what extent aid workers are also associated with international peacekeepers in the case of Mali. While the peacekeeping mission in Mali is the deadliest active mission, aid workers are not a prominent target. This is puzzling because humanitarians argue that peacekeeping missions impeded their security. However, when peacekeepers engage in humanitarian activities, the lines between military and humanitarian actors become blurred. This limits aid workers’ access to the population, which results in fewer attacks. I test this argument with novel data on peacekeeping stabilization projects in a difference-in-difference model with sliding spatio-temporal windows. I find that stabilization activities reduce humanitarian access on the ground in the short term. The chapter is followed by a qualitative analysis based on interviews with humanitarians which examines how aid workers are associated with peacekeepers. The qualitative interviews go a step beyond the theoretical framework by asking both sides how they deal with this association. In the humanitarian community, there is a common view that ‘all security is local’. This dissertation shows the limitations of the localization argument. The strategies of aid organizations alone do not have a significant impact on the safety of humanitarians. Rather, their security depends on the behavior or presence of other actors, such as governments or peacekeepers.