The main aim of this study is to highlight the decisive role that the management of history and memory, as well as forgetting, can play in the creation of a nation-state's national identity. From the time the nation-state emerged, the importance and definition of memory has been of utmost importance since it determined the very existence of the nation-state. In this study, the case of Spain is analyzed since it is a typical example of a country that based its existence as a unitary state on the development of a historiography that took the past of the entire Iberian Peninsula as a unified one. After presenting and analyzing the process of the creation of the Spanish collective identity from the 19th century, which was absolutely decisive for the creation of the Spanish national identity, the analysis continues in the more recent period. The way in which the Spanish regime managed historical memory is analyzed according to the objectives it pursued in each period of time, both after the victory of Franco and the implementation of his repressive regime, and after the end of the dictatorship and the advent of democracy in the country. It shows the different phases that Spanish society itself went through in difficult times, and how, through various sociopolitical upheavals, it managed to function smoothly in a climate of harmony, peace and democracy. Through this study, it also attempts to highlight the role of the historian, various other actors and ultimately the citizens of a nation state themselves in the formation of national identity. Furthermore, the aim of this study is to highlight Spain's attempt to balance between multiple and competing memories. Of particular interest is the fact that despite the organized effort made in Spain to silence the past, in recent years there has been an ongoing effort to recognize human rights violations and crimes committed during the Franco dictatorship. However, action to revive historical memory in Spain, despite coming from civil society, remains politically controversial. In this context, an analysis is presented on the management of memory and history in the case of Spain from the time of its emergence as a nation-state to the present day.