After the completion of the Reconquista, the kingdoms of Spain were united under Habsburg rule in 1516. At the same time, the Spanish Empire began to expand to the New World across the ocean, marking the beginning of the Spanish Golden Age of Spain, during which, from the early 1500s to the 1650s, Habsburg Spain was among the most powerful states in Europe.
In this time, Spain was involved in all major European wars, including the Italian Wars, the Eighty Years' War, the Thirty Years' War, and the Franco-Spanish War. In the later 17th century, however, Spanish power began to decline, and after the death of the last Habsburg ruler, the War of the Spanish Succession ended with the relegation of Spain, now under Bourbon rule, to the status of a second-rate power with a reduced influence in European affairs. The so-called Bourbon Reforms attempted the renewal of state institutions, with some success, but as the century ended, instability set in with the French Revolution and the Peninsular War, so that Spain never regained its former strength.
Fragmented by the war, Spain at the beginning of the 19th century was destabilised as different political parties representing "liberal", "reactionary", and "moderate" groups throughout the remainder of the century fought for and won short-lived control without any being sufficiently strong to bring about lasting stability. The former Spanish Empire overseas quickly disintegrated with the Latin American wars of independence and eventually the loss of what old colonies remained in the Spanish–American War of 1898.
A tenuous balance between liberal and conservative forces was struck in the establishment of constitutional monarchy during 1874–1931 but brought no lasting solution, and Spain descended into Civil War between the Republican and the Nationalist factions.
The war ended in a nationalist dictatorship, led by Francisco Franco, which controlled the Spanish government until 1975. The post-war decades were relatively stable (with the notable exception of an armed independence movement in the Basque Country), and the country experienced rapid economic growth in the 1960s and early 1970s.
Only with the death of Franco in 1975 did Spain return to Bourbon constitutional monarchy headed by Prince Juan Carlos and to democracy. Spain entered the European Economic Community in 1986 (transformed into the European Union with the Maastricht Treaty of 1992), and the Eurozone in 1999. The financial crisis of 2007–08 ended a decade of economic boom and Spain entered a recession and debt crisis and remains plagued by very high unemployment and a weak economy.
Spain is ranked as a middle power able to exert regional influence but unlike other powers with similar status (such as Germany, Italy and Japan) it is not part of the G8 and participates in the G20 only as a guest. Spain is part of the G6.