The Kingdom of Spain or Spain (Spanish and Galician: Reino de España or España; Catalan: Regne d'Espanya; Basque: Espainiako Erresuma) is a country located in the southwest of Europe. It shares the Iberian Peninsula with Portugal, Gibraltar and Andorra. To the northeast, along the Pyrenees mountain range, it borders France and the tiny principality of Andorra. It is adjacent to the Balearic Islands in the Mediterranean Sea, the Canary Islands in the Atlantic Ocean, the cities of Ceuta and Melilla in north Africa, and a number of uninhabited islands on the Mediterranean side of the strait of Gibraltar, known as Plazas de soberanía, such as the Chafarine islands, the "rocks" (es: peñones) of Vélez and Alhucemas, and the tiny Parsley Island (disputed). Due to the Spanish colonisation of the Americas, the Spanish language remains widely spoken outside of the country, and is the official language of nearly all Central and South American countries.
The original peoples of the Iberian peninsula, consisting of a number of separate tribes, are given the generic name of Iberians. This may have included the Basques, the only pre-Celtic people in Iberia surviving to the present day as a separate ethnic group. The most important culture of this period is that of the city of Tartessos. Beginning in the 9th century BC, Celtic tribes entered the Iberian peninsula through the Pyrenees and settled throughout the peninsula, becoming the Celt-Iberians. The Romans arrived in the Iberian peninsula during the Second Punic war in the 2nd century BC, and annexed it under Augustus after two centuries of war with the Celtic and Iberian tribes and the Phoenician, Greek and Carthaginian colonies becoming the province of Hispania.
From the 8th to the 15th centuries, the Iberian peninsula was ruled by Muslims who had crossed over from North Africa. Much of Spain's distinctive art originates from this seven-hundred-year period, and many Arabic words made their way into Spanish. By 1512, most of the kingdoms of present-day Spain were politically unified, although not as a modern centralized state. The grandson of Isabel and Fernando, Carlos I, extended his crown to other places in Europe and the rest of the world. The unification of Iberia was complete when Carlos I's son, Felipe II, became King of Portugal in 1580, as well as of the other Iberian Kingdoms (collectively known as "Spain" since this moment).
During the 16th century,with Carlos I and Felipe II, Spain became the most powerful European nation, its territory covering most of South and Central America, Asia - Pacific, the Iberian peninsula, southern Italy, Germany, and the Low Countries. This was later known as the Spanish Empire. It was also the wealthiest nation but the uncontrolled influx of goods and minerals from Spanish colonisation of the Americas resulted in rampant inflation and economic depression.
In 1640, under Felipe IV, the centralist policy of the Count-Duke of Olivares provoked wars in Portugal and Catalonia. Portugal became an independent kingdom again and Catalonia enjoyed some years of French-supported independence but was quickly returned to the Spanish Crown, except Rosellon. A series of long and costly wars and revolts followed in the 17th century, beginning a steady decline of Spanish power in Europe. Spain was occupied by Napoleon in the early 1800s, but the Spaniards rose in arms. After the War of Independence (1808–1814), a series of revolts and armed conflicts between Liberals and supporters of the ancien régime lasted throughout much of the 19th century, complicated by a dispute over dynastic succession by the Carlists which led to three civil wars. After that, Spain was briefly a Republic, from 1871 to 1873, a year in which a series of coups reinstalled the monarchy.
In the meantime, Spain lost all of its colonies in the Caribbean region and Asia-Pacific region during the 19th century, a trend which ended with the loss of Cuba, Puerto Rico, Philippines and Guam to the United States after the Spanish-American War of 1898.
A period of dictatorial rule (1923–1931) ended with the establishment of the Second Spanish Republic. The Republic offered political autonomy to the Basque Country and Catalonia and gave voting rights to women. However, with increasing political polarisation, anti-clericalism and pressure from all sides, coupled with growing and unchecked political violence, the Republic ended with the outbreak of the Spanish Civil War in July 1936. Following the victory of the nationalist forces in 1939, General Francisco Franco ruled a nation exhausted politically and economically. After World War II, being one of few surviving fascist regimes in Europe, Spain was politically and economically isolated and was kept out of the United Nations until 1955, when it became strategically important for U.S. president Eisenhower to establish a military presence in the Iberian peninsula. This opening to Spain was aided by Franco's rabid anti-communism. In the 1960s, more than a decade later than other western European countries, Spain began to enjoy economic growth and gradually transformed into a modern industrial economy with a thriving tourism sector. Growth continued well into the 1970s, with Franco's government going to great lengths to shield the Spanish people from the effects of the oil crisis.
Upon the death of the dictator General Franco in November 1975, his personally-designated heir Prince Juan Carlos assumed the position of king and head of state. With the approval of the Spanish Constitution of 1978 and the arrival of democracy, the old historic nationalities — Basque Country, Catalonia, Galicia and Andalusia— were given far-reaching autonomy, which was then soon extended to all Spanish regions, resulting in one of the most decentralized territorial organizations in Western Europe. However, ETA's terrorism continues being one of the most important problems facing Spain.