At the crossroads between Europe and Africa, the Iberian Peninsula has always been a target for invading races and civilisations. The Romans arrived in the 3rd century BC but took two centuries to subdue the peninsula. Gradually Roman laws, languages and customs were adopted. In 409 AD, Roman Hispania was invaded by a massive contingent of Germanic tribes and by 419 a Visigothic kingdom had been established. The Visigoths ruled until 711, when the Muslims crossed the Strait of Gibraltar and defeated Roderick, the last Goth king.
By 714, the Muslim armies had occupied the entire peninsula, apart from the mountainous regions of northern Spain. The Muslim occupation of southern Spain (which the Spanish called Al-Andalus) was to last almost 800 years. During this period, the arts and sciences prospered, new crops and agricultural techniques were introduced and palaces, mosques, schools, gardens and public baths were built. In 722, at Covadonga in northern Spain, a small army under the Visigothic king Pelayo inflicted the first defeat on the Muslims. Symbolically, this battle marked the beginning of the Reconquista, the reconquest of Spain by the Christians.
By the end of the 13th century, Castilla and Aragón had emerged as Christian Spain's two main powers, and in 1469 these two kingdoms were united by the marriage of Isabel, princess of Castilla, to Fernando, heir to the throne of Aragón. Known as the Catholic Monarchs, they united all of Spain and laid the foundations for the golden age. In 1478, they established the notoriously ruthless Spanish Inquisition, expelling and executing thousands of Jews and other non-Christians. In 1482, they besieged Granada, and 10 years later the last Muslim king surrendered to them, marking the long-awaited end of the Reconquista.
Spain developed an enormous empire in the New World, following Columbus' arrival in the Americas in 1492. Gold and silver came flooding into Spanish coffers from Mexico and Peru as the conquistadors claimed land from Cuba to Bolivia. Spain monopolised trade with these new colonies and became one of the most powerful nations on earth. However, this protectionism hindered development of the colonies and led to a series of expensive wars with England, France and the Netherlands.
When Louis XVI was guillotined in 1793, Spain declared war on the new French republic, but was defeated. In 1808, Napoleon's troops entered Spain and the Spanish Crown began to lose its hold on its colonies. Sparked by an uprising in Madrid, the Spanish people united against the French and fought a five-year war of independence. In 1813, the French forces were finally expelled, and in 1814 Fernando VII was restored to the Spanish throne. Fernando's subsequent 20-year reign was a disastrous advertisement for the monarchy. During his time, the Inquisition was re-established, liberals and constitutionalists were persecuted, free speech was repressed, Spain entered a severe economic recession and the American colonies won their independence.
The disastrous Spanish-American War of 1898 marked the end of the Spanish Empire. Spain was defeated by the USA in a series of one-sided naval battles, resulting in the loss of Cuba, Puerto Rico, Guam and the Philippines, Spain's last overseas possessions. Spain's troubles continued during the early 20th century. In 1923, with the country on the brink of civil war, Miguel Primo de Rivera declared himself military dictator and ruled until 1930. In 1931, Alfonso XIII fled the country, and the Second Republic was declared, but it soon fell victim to internal conflict. The 1936 elections saw the country split in two, with the Republican government and its supporters on one side (an uneasy alliance of communists, socialists and anarchists, who favoured a more equitable civil society and a diminished role for the Church) and the opposition Nationalists (a right-wing alliance of the army, the Church, the monarchy and the fascist-style Falange Party) on the other.
The assassination of the opposition leader José Calvo Sotelo by Republican police officers in July 1936 gave the army an excuse to overthrow the government. During the subsequent Civil War (1936-39), the Nationalists received extensive military and financial support from Nazi Germany and fascist Italy, while the elected Republican government received support only from Russia and, to a lesser degree, from the International Brigades, made up of foreign idealists. Despite the threat of fascism, England and France refused to support the Republicans.
By 1939, the Nationalists, led by Franco, had won the war. More than 350,000 Spaniards had died in the fighting, but more bloodletting ensued. An estimated 100,000 Republicans were executed or died in prison after the war. Franco's 35-year dictatorship saw Spain isolated by economic blockades, excluded from NATO and the UN and crippled by economic recession. It wasn't until the early 1950s, when the rise in tourism and a treaty with the USA combined to provide much needed funds, that the country began to recover. By the 1970s, Spain had the fastest growing economy in Europe.
Franco died in 1975, having earlier named Juan Carlos, the grandson of Alfonso XIII, his successor. With Juan Carlos on the throne, Spain made the transition from dictatorship to democracy. The first elections were held in 1977, a new constitution was drafted in 1978, and a failed military coup in 1981 was seen as a futile attempt to turn back the clock. In 1982 Spain made a final break with the past by voting in a socialist government with a sizeable majority. The only major blemish on the domestic front since has been the terrorist campaign waged by separatist militant group ETA, which is trying to secure an independent Basque homeland. During 30 years of terrorist activity, ETA has killed over 800 people.
In 1986 Spain joined the EC (now the EU) and in 1992 Spain announced its return to the world stage, with Barcelona hosting the Olympic Games, Seville hosting Expo 92 and Madrid being declared European Cultural Capital. In 1996 Spaniards voted in a conservative party under the leadership of the uncharismatic José María Aznar, an Elton John fan and former tax inspector. In March 2000 he was re-elected with an absolute majority; his success has been attributed to the buoyant state of the Spanish economy, which has experienced 4% annual growth since Aznar came to power.