Spain: a history from Al-Andalus to modern democracy

For nearly eight centuries much of Spain was Al-Andalus, a centre of Muslim learning. Iqbal's poem on the mosque of Córdoba keeps that memory alive in Pakistan.

By Last reviewed

Spain
Spain and its neighbours. Borders approximate.

Key facts

Capital
Madrid
Form of government
Parliamentary monarchy under the 1978 constitution
Head of state
King Felipe VI, since 2014
Population
About 48 million
Languages
Spanish, with Catalan, Galician and Basque in their regions
Link with Pakistan
Iqbal's poem Masjid-e-Qurtuba, written after his 1933 visit

Through the ages

The main periods of Spain's history, 1100 BCE to today. Recent centuries are drawn wider so they can be read.

  1. Iberians, Celts and Phoenicians1100 BCE to 218 BCE
  2. Roman Hispania218 BCE to 409 CE
  3. Visigothic kingdom418 CE to 711 CE
  4. Al-Andalus711 CE to 1492
  5. Christian kingdoms of the north718 CE to 1492
  6. Habsburg Spain and empire1516 to 1700
  7. Bourbon monarchy1700 to 1931
  8. Second Republic and civil war1931 to 1939
  9. Franco dictatorship1939 to 1975
  10. Democratic Spain1975 to today

Timeline

  1. c. 1100 BCE
    Civilisation

    Phoenicians at Cádiz

    Phoenician traders found Gadir, today's Cádiz, one of the oldest cities in western Europe.

  2. 218 BCE
    Empires and dynasties

    Rome arrives

    Roman armies land in Spain during the war with Carthage. Hispania becomes one of Rome's most important provinces.

  3. 711 CE
    Wars and conflict

    Tariq ibn Ziyad crosses to Spain

    A Muslim army under Tariq ibn Ziyad crosses from North Africa and defeats the Visigoths. Gibraltar, Jabal Tariq, is named after him. In the same year, Muhammad bin Qasim was marching into Sindh.

  4. 756 CE
    Empires and dynasties

    The Umayyads of Córdoba

    Abd al-Rahman I, a survivor of the Umayyad dynasty overthrown in Damascus, founds an emirate at Córdoba.

  5. c. 785 CE
    Culture and faith

    The Great Mosque of Córdoba

    Work begins on the Great Mosque of Córdoba, enlarged over the next two centuries into one of the wonders of Islamic architecture.

  6. 929 CE
    Empires and dynasties

    The Caliphate of Córdoba

    Abd al-Rahman III declares himself caliph. Córdoba becomes one of the largest and most learned cities in Europe.

  7. 1031
    Politics

    The caliphate breaks up

    Al-Andalus splits into rival small kingdoms, the taifas, which the Christian kingdoms of the north begin to conquer.

  8. 1085
    Wars and conflict

    Toledo falls to Castile

    Castile takes Toledo, where scholars later translate Arabic works of science and philosophy into Latin.

  9. 1236
    Wars and conflict

    Córdoba is taken

    Ferdinand III of Castile captures Córdoba, and the Great Mosque is turned into a cathedral.

  10. 2 January 1492
    Wars and conflict

    Granada falls

    Muhammad XII, the last Nasrid sultan, surrenders Granada and the Alhambra to Ferdinand and Isabella, ending Muslim rule in Spain. The same year, Jews are expelled and Columbus sails west.

  11. 1588
    Wars and conflict

    The Armada

    At the height of its empire in the Americas, Spain sends a great fleet against England. It is defeated.

  12. 1609
    Politics

    The Moriscos are expelled

    Spain begins expelling the Moriscos, descendants of Muslims forced to convert to Christianity, a process completed by 1614.

  13. 1898
    Wars and conflict

    The end of empire

    Defeat by the United States costs Spain Cuba, Puerto Rico and the Philippines, its last major colonies.

  14. January 1933
    Culture and faith

    Iqbal at Córdoba

    Allama Iqbal visits Spain and is allowed to pray in the Mosque-Cathedral of Córdoba. His poem Masjid-e-Qurtuba, published in Bal-e-Jibril, is among his most celebrated.

  15. 1936 to 1939
    Wars and conflict

    The Spanish Civil War

    A military uprising against the Republic leads to a civil war won by General Francisco Franco, who rules as dictator until his death in 1975.

  16. 1978
    Politics

    A democratic constitution

    After Franco's death, King Juan Carlos backs a transition to democracy, sealed by the 1978 constitution.

  17. 1986
    Treaties and agreements

    Spain joins the European Community

    Spain and Portugal join the European Economic Community.

  18. 11 March 2004
    Disasters

    The Madrid train bombings

    Bombs on commuter trains in Madrid kill nearly 200 people, the deadliest attack in Spain's modern history.

Before Al-Andalus

The Iberian peninsula was home to Iberians and Celts when Phoenician traders founded Cádiz around 1100 BCE. Rome conquered it after the war with Carthage, and Hispania became one of the empire’s richest provinces, birthplace of emperors such as Trajan. When Rome fell, the Visigoths ruled a Christian kingdom from Toledo.

Al-Andalus

In 711, the same year that Muhammad bin Qasim entered Sindh, a Muslim army under Tariq ibn Ziyad crossed the strait from North Africa, landing at the rock that still bears his name, Gibraltar. Within a few years most of the peninsula was under Muslim rule. In 756 Abd al-Rahman I, who had escaped the massacre of his Umayyad family in Damascus, founded an emirate at Córdoba, and in 929 his descendant Abd al-Rahman III proclaimed a caliphate.

At its height, Córdoba was one of the largest and most cultured cities in Europe, with libraries, paved streets and the Great Mosque. Scholars of Al-Andalus, such as the philosopher Ibn Rushd, known in Europe as Averroes, carried the learning of the Islamic world into Europe. After 1031 the caliphate broke apart, and the Christian kingdoms of the north advanced. Toledo fell in 1085 and Córdoba in 1236. The Nasrid kingdom of Granada, builders of the Alhambra, held out until 2 January 1492.

Empire and decline

The fall of Granada was followed by the expulsion of Spain’s Jews, and later of the Moriscos, Muslims who had been forced to convert. The same year, Columbus reached the Americas for the Spanish crown, opening the way to a vast empire. For a century Spain was the strongest power in Europe, but wars and debt wore it down, and by 1898 it had lost its last major colonies.

Civil war and democracy

The twentieth century brought a short-lived republic, a brutal civil war from 1936 to 1939 and nearly four decades of dictatorship under Francisco Franco. After his death in 1975, King Juan Carlos supported a peaceful move to democracy, and the 1978 constitution made Spain a parliamentary monarchy. It joined the European Community in 1986.

Spain and Pakistan

For Pakistani readers, Spain is above all the land of Al-Andalus. In January 1933 Allama Iqbal visited Córdoba and was allowed to offer prayers in the old mosque. The visit inspired Masjid-e-Qurtuba, one of the best-loved poems in Urdu, published in Bal-e-Jibril in 1935. Today Spain, and especially Barcelona, is home to a large Pakistani community.

For our latest reporting on Spain, see the news listed on this page.

Landmarks and heritage

From 785

Mosque-Cathedral of Córdoba

Córdoba, Andalusia

A forest of red-and-white arches built by the Umayyads, with a cathedral inserted in its centre after 1236. Part of the Historic Centre of Córdoba World Heritage Site.

13th to 14th centuries

The Alhambra

Granada, Andalusia

The palace-fortress of the Nasrid sultans, famous for its courtyards, fountains and carved plaster. A UNESCO World Heritage Site.

Roman to Renaissance

Historic City of Toledo

Toledo

A city where Muslim, Jewish and Christian monuments stand side by side. A UNESCO World Heritage Site.

From 1882

Sagrada Família

Barcelona

Antoni Gaudí's unfinished basilica, part of the Works of Antoni Gaudí World Heritage Site.

Terms you will meet in the news

Al-Andalus
The Arabic name for the parts of the Iberian peninsula under Muslim rule from 711 to 1492.
Reconquista
The term Spanish historians use for the centuries-long conquest of Al-Andalus by the Christian kingdoms of the north.
Moriscos
Muslims of Spain who were forced to convert to Christianity after 1492, and who were expelled between 1609 and 1614.
Mudéjar
The style of architecture made by Muslim craftsmen living under Christian rule, blending Islamic and Gothic forms.

Quick answers

How long did Muslims rule in Spain?

From 711, when Tariq ibn Ziyad crossed from North Africa, until the fall of Granada on 2 January 1492, nearly eight centuries.

What is Iqbal's Masjid-e-Qurtuba?

A famous Urdu poem by Allama Iqbal about the Great Mosque of Córdoba, written after he visited it in 1933 and published in Bal-e-Jibril.

When did Spain become a democracy?

After Franco's death in 1975. The democratic constitution was approved in 1978.

Sources and further reading

Compiled by The Indus Compass from the sources above and standard reference works, and reviewed 26 November 2026. Dates before the modern era are approximate and some are debated by historians. Spotted a mistake? Tell the newsroom and we will correct it.