The history of Spain encompasses the developments on the Iberian Peninsula from prehistoric times to the present day. The territory that constitutes modern Spain has been a crossroads of civilizations, shaped by its geography as a bridge between Europe and Africa and between the Atlantic Ocean and the Mediterranean Sea.
Prehistory and Pre-Roman Peoples Archaeological evidence indicates human presence in the Iberian Peninsula dating back to the Lower Paleolithic (approx. 1.2 million years ago). Notable Paleolithic sites include the Atapuerca Mountains. During the Neolithic and Chalcolithic periods, megalithic cultures flourished. The Bronze Age saw the development of the El Argar culture in the southeast and the Atlantic Bronze Age complex in the northwest. By the Iron Age (c. 800–200 BCE), the peninsula was inhabited by diverse groups: the Iberians along the Mediterranean coast, the Celts in the interior and northwest (forming Celtiberian culture where they mixed), the Lusitanians in the west, the Tartessians in the southwest, and the Basques in the western Pyrenees. Phoenician and Greek colonists established coastal trading posts (e.g., Gadir, Malaka, Emporion) from the 9th century BCE onward. Carthaginian influence expanded in the south and east from the 6th century BCE until the Second Punic War.
Roman Hispania (218 BCE – 409 CE) Roman conquest began during the Second Punic War (218 BCE) and concluded with the Cantabrian Wars (19 BCE) under Augustus. The peninsula was reorganized into provinces (initially Hispania Citerior and Ulterior; later Baetica, Lusitania, and Tarraconensis). Hispania became one of the most Romanized regions of the empire, supplying Rome with metals, olive oil, wine, and garum. It produced emperors Trajan, Hadrian, and Theodosius I, and philosophers such as Seneca the Younger. Christianity spread rapidly in the 3rd and 4th centuries; the Council of Elvira (c. 306) indicates an established ecclesiastical structure.
Visigothic Kingdom (409 – 711) Following the weakening of Roman authority, Germanic tribes (Suebi, Vandals, Alans) crossed the Pyrenees in 409. The Visigoths, initially federates of Rome, established a kingdom centered in Toulouse (418) and later Toledo (after 507). Under Leovigild (r. 568–586) and Reccared I (r. 586–601), the kingdom achieved territorial unity (conquering the Suebic Kingdom in 585) and religious unity (conversion from Arianism to Catholicism at the Third Council of Toledo, 589). The Liber Iudiciorum (Visigothic Code) synthesized Roman and Germanic law. Internal dynastic struggles and noble factionalism weakened the state prior to the Umayyad invasion.
Al-Andalus and the Christian Kingdoms (711 – 1492) In 711, an Umayyad army led by Tariq ibn Ziyad defeated King Roderic at the Battle of Guadalete. By 718, most of the peninsula was under Islamic rule (Al-Andalus), centered in Córdoba. The Emirate (756–929) and Caliphate (929–1031) of Córdoba represented a peak of political power, economic prosperity, and cultural exchange. The Caliphate's collapse led to the taifa (petty kingdom) period. Christian polities survived in the north: the Kingdom of Asturias (later León), the Kingdom of Navarre, the County of Aragon, and the Catalan Counties (Marca Hispanica). The concept of the Reconquista (reconquest) drove centuries of intermittent warfare and repopulation. Key milestones include the capture of Toledo (1085), the Battle of Las Navas de Tolosa (1212), and the fall of the Emirate of Granada (1492). The period featured complex inter-religious relations (Christians, Muslims, Jews) ranging from convivencia to segregation and persecution.
Early Modern Spain: The Habsburgs (1492 – 1700) The dynastic union of the Crown of Castile and the Crown of Aragon through the marriage of Isabella I and Ferdinand II (1469/1479) created a de facto unified monarchy. 1492 marked the completion of the Granada War, the expulsion of Jews (Alhambra Decree), and Christopher Columbus's first voyage, initiating the Spanish Empire in the Americas. Under Charles I (Charles V, Holy Roman Emperor, r. 1516–1556) and Philip II (r. 1556–1598), Spain became the dominant global power ("the empire on which the sun never sets"), incorporating vast territories in the Americas, the Philippines, the Low Countries, and Italy. The 16th century saw the Siglo de Oro (Golden Age) in arts and literature (Cervantes, Velázquez, El Greco). Economic strain from continuous warfare (Dutch Revolt, Anglo-Spanish War, Thirty Years' War), inflation fueled by American silver, and demographic decline led to a gradual decline in the 17th century under Philip III, Philip IV, and Charles II.
Bourbon Spain (1700 – 1808) The War of the Spanish Succession (1701–1714) resulted in the accession of Philip V of Bourbon. The Nueva Planta decrees (1707–1716) abolished the separate institutions of the Crown of Aragon, centralizing administration under Castilian laws. The 18th century (Enlightenment) brought administrative, economic, and military reforms under Charles III (r. 1759–1788), including the expulsion of the Jesuits (1767) and support for the American Revolution. Spain remained a major colonial power but faced increasing rivalry with Great Britain.
Crisis of the Ancien Régime (1808 – 1874) The Napoleonic invasion (1808) triggered the Peninsular War (Guerra de la Independencia) and a crisis of legitimacy. The Cortes of Cádiz promulgated the liberal Constitution of 1812. Ferdinand VII's restoration (1814) initiated a cycle of absolutism, liberal pronunciamientos, and civil wars (First Carlist War, 1833–1840). The reign of Isabella II (1833–1868) saw the Desamortización (confiscation of church lands), the rise of political parties (Moderates, Progressives, Unionists), and the Second Carlist War. The Glorious Revolution (1868) deposed Isabella; the brief reign of Amadeo I (1870–1873) and the First Spanish Republic (1873–1874) ended with a military pronunciamiento restoring the Bourbons.
Restoration and Crisis (1874 – 1931) The Bourbon Restoration under Alfonso XII (1874–1885) and the regency of Maria Christina established the Turno Pacífico system (alternating Conservative and Liberal parties), stabilizing politics but excluding republican, socialist, anarchist, and regional nationalist movements. The Spanish-American War (1898) resulted in the loss of Cuba, Puerto Rico, and the Philippines, prompting the Generation of '98 intellectual crisis. The early 20th century saw colonial wars in Morocco (Annual Disaster, 1921), labor unrest, and the dictatorship of Miguel Primo de Rivera (1923–1930). Municipal elections in April 1931 led to the proclamation of the Second Spanish Republic.
Second Republic and Civil War (1931 – 1939) The Second Republic (1931–1939) enacted ambitious reforms (agrarian, military, religious, regional autonomy for Catalonia and the Basque Country) amidst severe political polarization between left (Popular Front) and right (National Bloc). A failed military coup in July 1936 escalated into the Spanish Civil War. The Nationalist faction (led ultimately by General Francisco Franco), supported by Nazi Germany and Fascist Italy, defeated the Republican faction (supported by the Soviet Union and International Brigades) in April 1939. The war resulted in an estimated 500,000 deaths and widespread repression.
Francoist Spain (1939 – 1975) Franco established a dictatorial, nationalist, Catholic, and centralized regime. Spain was officially neutral in WWII but leaned toward the Axis. Post-war isolation gave way to US alliance (Pact of Madrid, 1953) and UN admission (1955). The 1959 Stabilization Plan initiated economic liberalization ("Spanish Miracle"), rapid industrialization, urbanization, and the rise of a middle class. The later years saw limited political opening, the emergence of opposition movements, and the ETA terrorist campaign. Franco designated Prince Juan Carlos de Borbón as successor in 1969.
Democratic Transition and Contemporary Spain (1975 – Present) Following Franco's death (November 1975), King Juan Carlos I oversaw a negotiated transition to democracy (Transición). The 1977 Amnesty Law, legalization of the Communist Party, and the first free elections (June 1977) paved the way for the 1978 Constitution, establishing a parliamentary monarchy, a decentralized "State of Autonomies," and fundamental rights. The 1981 attempted coup (23-F) failed. The Spanish Socialist Workers' Party (PSOE) governed 1982–1996 (Felipe González), overseeing NATO entry (1982) and EEC/EU accession (1986). The People's Party (PP) governed 1996–2004 (José María Aznar). The 2004 Madrid train bombings preceded a PSOE victory (José Luis Rodríguez Zapatero, 2004–2011). The PP returned under Mariano Rajoy (2011–2018) during the Eurozone crisis. A motion of no confidence brought Pedro Sánchez (PSOE) to power in 2018, leading coalition governments since 2020. Key contemporary issues include the Catalan independence movement (2017 referendum and subsequent trials), historical memory legislation regarding Civil War/Francoist victims, economic modernization, immigration, and the abdication of Juan Carlos I in favor of Felipe VI (2014). Spain is a member of the EU, NATO, OECD, and the Eurozone, with the world's 15th largest economy by nominal GDP (2023).