In Peru, the recent commodity boom and high transfers by mining canon have meant a series of challenges and challenges for the State, in particular, the management of socio-environmental conflicts linked to extractive activities. However, a general balance shows strong contrasts where, on the one hand, we find regions with persistence of social conflicts and little progress in the rounds tables, while other regions show learning in the management of social conflicts from the local bureaucracy and civil society. Why, in some local contexts, mining activity has led to serious problems of social conflict and in others it has not? This research focuses on the department of Moquegua (2002-2016), a region dependent on mining revenues that has shown a positive performance in the management of socioenvironmental conflicts and in the negotiating tables for the viability of mining projects. Considering the importance of the regional context, the central argument proposes that the institutional legacies and active participation of civil society are key factors to understand the trajectory in the management of social conflict. Finally, these factors will help us to understand the challenges of the state for the management of conflicts in other regions.