Why do some peace agreements end armed conflicts whereas others do not? Previous studies have primarily focused on the relation between warring parties and the provisions included in peace agreements. Prominent mediators, however, have emphasised the importance of stakeholders at various levels for the outcome of peace agreements. To match the experience of these negotiators we apply a level-of-analysis approach to examine the contextual circumstances under which peace agreements are concluded. While prominent within the causes of war literature, level-of-analysis approaches are surprisingly scant in research about conflict resolution. This article compares two Sudanese Peace Agreements: the Comprehensive Peace Agreement (2005) that ended the North–South war and led to the independence of South Sudan, and the Darfur Peace Agreement (2006) which failed to end fighting in Darfur. We find that factors at the local, national and international level explain the different outcomes of the two agreements. Hence, the two case studies illustrate the merit of employing a level-of-analysis approach to study the outcome of peace agreements. The main contribution of this article is that it presents a new theoretical framework to understand why some peace agreements terminate armed conflict whereas others do not.