The Iberian Peninsula has been settled for millennia. Some of Europe's most impressive Paleolithic cultural sites are located in Spain, including the famous caves at Altamira that contain spectacular paintings dating from about 15,000 to 25,000 years ago. Beginning in the ninth century BC, Phoenicians, Greeks, Carthaginians, and Celts entered the Iberian Peninsula. The Romans followed in the second century BC and laid the groundwork for Spain's present language, religion, and laws. Although the Visigoths arrived in the fifth century AD, the last Roman strongholds along the southern coast did not fall until the seventh century AD. In 711, North African Moors sailed across the straits, swept into Andalusia, and within a few years, pushed the Visigoths up the peninsula to the Cantabrian Mountains. The Reconquest--efforts to drive out the Moors--lasted until 1492. By 1512, the unification of present-day Spain was complete.
During the 16th century, Spain became the most powerful nation in Europe, due to the immense wealth derived from its presence in the Americas. But a series of long, costly wars and revolts, capped by the English defeat of the "Invincible Armada" in 1588, began a steady decline of Spanish power in Europe. Controversy over succession to the throne consumed the country during the 18th century, leading to an occupation by France during the Napoleonic era in the early 1800s and a series of armed conflicts throughout much of the 19th century.
The 19th century saw the revolt and independence of most of Spain's colonies in the Western Hemisphere; three wars over the succession issue; the brief ousting of the monarchy and establishment of the First Republic (1873-74); and, finally, the Spanish-American War (1898), in which Spain lost Cuba, Puerto Rico, and the Philippines to the United States. A period of dictatorial rule (1923-31) ended with the establishment of the Second Republic. It was dominated by increasing political polarization, culminating in the leftist Popular Front electoral victory in 1936. Pressures from all sides, coupled with growing and unchecked violence, led to the outbreak of the Spanish Civil War in July 1936.
Following the victory of his nationalist forces in 1939, General Francisco Franco ruled a nation exhausted politically and economically. Spain was officially neutral during World War II but followed a pro-Axis policy. Therefore, the victorious Allies isolated Spain at the beginning of the postwar period. The country signed the Mutual Defense Assistance Agreement with the U.S. on September 26, 1953 and joined the United Nations in 1955. In 1959, under an International Monetary Fund (IMF) stabilization plan, the country began liberalizing trade and capital flows, particularly foreign direct investment.
Despite the success of economic liberalization, Spain remained for years the most closed economy in Western Europe--judged by the small measure of foreign trade to economic activity--and the pace of reform slackened during the 1960s as the state remained committed to "guiding" the economy. Nevertheless, in the 1960s and 1970s, Spain was transformed into a modern industrial economy with a thriving tourism sector. Its economic expansion led to improved income distribution and helped develop a large middle class. Social changes brought about by economic prosperity and the inflow of new ideas helped set the stage for Spain's transition to democracy during the latter half of the 1970s.
Upon the death of General Franco in November 1975, Franco's personally-designated heir Prince Juan Carlos de Borbon y Borbon assumed the titles of king and chief of state. Dissatisfied with the slow pace of post-Franco liberalization, he replaced Franco's last prime minister with Adolfo Suarez in July 1976. Suarez entered office promising that elections would be held within 1 year, and his government moved to enact a series of laws to liberalize the new regime. Spain's first elections since 1936 to the Cortes (Parliament) were held on June 15, 1977. Prime Minister Suarez's Union of the Democratic Center (UCD), a moderate center-right coalition, won 34% of the vote and the largest bloc of seats in the Cortes.
Under Suarez, the new Cortes set about drafting a democratic constitution that was overwhelmingly approved by voters in a national referendum in December 1978.
Sources:CIA World Factbook (January 2012)
U.S. Dept. of State Country Background Notes ( January 2012)