Present-day Spanish language, law, and religion date from the Roman conquest, which began in the second century BC , and lasted until the fifth century AD , with the invasion of the Visigoths. The arrival of the Moors in 711 AD brought an end to Visigoth power, and it was not until 1492 that the Moors were driven out. By 1512, the unification of present-day Spain was complete.
During the sixteenth century, Spain was the most powerful of the European nations, due largely to the immense wealth derived from its colonial expansion into the Americas. The defeat of the Spanish Armada by the British in 1588 was the beginning of a steady decline of Spanish influence in Europe. The nineteenth century brought with it the revolt and subsequent independence of most of Spain's colonies.
The twentieth century saw no great improvement in Spain's fortunes. In 1931 a democratic republic was established. In 1936 the Army, led by General Fransisco Franco y Bahamonde revolted against the republic. A bloody civil war lasted until 1939 when Franco's Nationalist forces defeated the Loyalist forces. The Nationalist victory in 1939 swept into power General Franco, who established an authoritarian government which severely restricted individual liberties and repressed any challenge to its power. General Franco died in November 1975 and was succeeded by King Juan Carlos. A new and more liberal council of ministers was formed and restrictions on political activity were lifted, but long pent-up pressures and frustration at the pace of reforms led to widespread demonstrations. In July 1976 Prime Minister Carlos Arias Navarro, who had been appointed by General Franco, resigned at the king's request, and was replaced by Adolfo Suárez González. Political reforms then proceeded rapidly, including the establishment of a bicameral legislature.
General elections in October 1982 brought decisive victory to the Partido Socialista Obrero Español (PSOE—Socialist Workers' Party) and to the party's leader Felipe González Márquez. Despite gradual but continual erosion of support over the years, González and the PSOE remained in power throughout the 1980s and early 1990s. It was during González's tenure that Spain faced a range of controversial issues, and it is due in part to these factors that the popularity of the government suffered. Economic rationalization met with bitter opposition from trade unions, education reform met with resistance from the public, and Spain's continued membership in the North Atlantic Treaty Organization (NATO) was the source of large-scale public demonstrations. Despite these obstacles, economic rationalization did take place, paving the way for Spain's full membership in the EU; education reform went forward; and Spain remained a full member of NATO after a general referendum on the question in March 1986. In the early 1990s, the government was rocked by a series of financial scandals involving family members of some government officials. Following an eruption of even more scandalous allegations concerning the PSOE's financing, early elections were called for 6 June 1993. The PSOE was once again returned to office, but for the first time lost its majority in the Cortes Generales (National Assembly). By 1996, Spanish voters had put the conservative Popular Party (PP) in power, with José María Aznar as head of government. Unknown outside conservative circles, Aznar ruled the country during a prosperous time. While his party lacked a majority, and had to broker agreements with minority parties to rule, the country was taking a decisive turn to conservatism. In March 2000, the PP obtained a resounding victory, capturing a majority of seats in the Congress of Deputies. With an absolute majority, the PP didn't need help from any party to govern.
Under the 1978 Constitution, Spain is a hereditary monarchy and the king is head of state. The king appoints the president of the government (prime minister) and the council of ministers on the prime minister's recommendation. Legislative authority is vested in the Cortes Generales, which consists of the 350-seat Congreso de los Diputados (Congress of Deputies), elected by proportional representation; and the Senado (Senate), comprised of 208 directly elected members and 51 regional representatives. Both houses are elected by universal adult suffrage to four-year terms, subject to dissolution.