Abstract: What do UN missions do on the ground for containing electoral violence in conflict-affected countries? While previous research has investigated where UN peace operations are deployed across and within countries and the type of UN conflict management efforts, including diplomacy and sanctions, a systematic analysis of the choice of UN peace-building activities during electoral periods is missing. This paper argues that the UN invests more resources in activities assisting electoral security when threats of electoral violence loom larger. Variation in UN peace operations’ electoral security assistance follows this instrumental logic because member states seek to minimize negative externalities, UN bureaucrats seek to uphold organizational legitimacy and elections maximize attention and pressure on the UN to adequately respond to electoral conflict threats. However, UN Security Council members and UN host state governments may also shape the choice of UN peace operations’ activities to in uence their interests. Using new disaggregated data on the activities of 44 UN peacekeeping and political missions in 119 electoral periods in 31 conflict-affected countries from 1990 to 2012, this study finds that election-related security threats positively influence UN investment in electoral security assistance but that historical and military ties between UN host countries and powerful UN member states also play a role. The results imply that the UN can live up to its humanitarian and security mission and that self-selection into the most violent elections needs to be taken into account to avoid under estimating the UN’s positive contribution to electoral peace.