CoMPS

Home / Countries / Spain

Islam by country · Europe

Islam in Spain: history and Muslim population data

Explore CoMPS research on the historical journey of Islam in Spain, alongside population data and an interactive timeline.

Open Spain in the interactive map

History of Islam in Spain

Islam entered Spain when its residents requested the help of Muslims who just conquered North Africa. The residents of the Iberian Peninsula were under the wrath of the German Visigothic Kingdom. The Muslim conquest occurred during the Umayyad Empire, within the reign of al-Walid I bnu Abdel Malik, who reigned from 705 to 715, and was the sixth Umayyad King. The Muslim troops in northwest Africa were under the leadership of Musa bnu Nusayr, who sent troops under the leadership of Tariq bnu Ziyad to conquer the Peninsula. The mission was a great success and the whole peninsula fell to Muslim control between 711 and 718 (92-99H), after the decisive Battle of Guadalete. Accordingly, Muslims captured Toledo in 712, which was the capital of the Visigothic Kingdom, and by 715, Barcelona in the northeastern shore and the rest of the Peninsula was under Muslim control. The Balearic Islands were captured in 903.

While the Umayyad Empire fell down in the East in 750, and replaced by the Abbasid Empire, Abdul Rahamn I Addakhil (the Enterer) bnu Muawiya bnu Hisham, continued in 756 the Empire in the Iberian Peninsula, or al-Andalus, with Cordoba as its capital. The dynasty lasted until 1031, when the country fell into 23 small Muslim emirates, which were easy prey for Christian forces from the north.

Many Christians, who were not happy with the Muslim conquest, migrated north to treacherous mountains. Muslims did not hold the northwest part of the Peninsula for long. Pelayo ben Favila, a nobleman who escaped from Toledo as it was conquered by Muslims, triggered a revolt in the city of Gijon in 718, which started the Christian Kingdom of Asturias, with its capital in Cangas de Onis. It was then eventually disintegrated into three other Christian Kingdoms: Castile, Galicia, and Leon, all advancing and gaining territory from the Muslims in a span of the following seven centuries, together with other Christian Kingdoms coming from the Pyrenees region. After the defeat of the Umayyad Muslims in the Battle of Covadonga in 722, the Asturians conquered Galicia in 739 and León in 754. Muslims lost Barcelona in 801 and Salamanca (northeast of Portugal) in 939.

After the disintegration of the Umayyads in 1031, the Christian troops kept moving south, conquering one emirate after another, until they captured Toledo in 1089, which is located in the middle of the Peninsula, just south of Madrid, the current capital of Spain. The Andalusian Muslims then requested the help of Almoravid Muslim Dynasty with their Capital Marrakech in current Morocco. The ruler of the dynast was Yusuf bnu Tashfin, who ruled between 1061 and 1106. He stopped the advance of the Christians at the Battle of Zallaqa (Arabic for slippery) or the Battle of Sagrajas in 1086.

The Almoravids got weaker and then replaced by the Almohad Dynasty by 1147. By then Muslims lost Zaragoza in 1139, located in the northeast of the Peninsula, Lisbon in 1147, located in the southwest of the Peninsula and current capital of Portugal. The Almohads continued helping Muslims and fighting the Christians in the Peninsula, until the Almohads had a terrible defeat in the Battle of Oqab (crow in Arabic) or the Battle of Las Navas de Tolosa in 1212 or 609H. This was followed by the fall of the Balearic Islands from 1228 to 1232, Badajoz in 1229, Cordoba in 1236, Valencia in 1238, Murcia in 1243, Cartagena in 1245, Seville in 1248, Huelva in 1250 Arcos, Medina-Sidona, Jerez, and Cadiz in 1262, and Tarifa in 1294.

The Nasrid Muslim Dynasty was established in 1232 with its capital Grenada in the southeast of the Peninsula. The latter continued to shrink with the fall of Baeza, Malaga, and Almeria in 1487, then Almuñécar and Salobreña in 1489. By 1491, the Dynasty consisted of only the city of Grenada which eventually was captured by the Christians in 1492 (897H), which marks the end of Muslim rule in the Iberian Peninsula. Thus, Spain was under Muslim control for up to 781 years. The Canary Islands were captured by the Castilians between 1402 and 1405, then the two cities in north Morocco: Ceuta in 1415, Melilla in 1497.

Muslims continued to decrease in Iberia by fleeing or being forced to accept Christianity, including by burning them alive. In 1609-1614 (1018-1023H), following a decree by King Felipe III (reined 1598-1621), a third of a million of Muslims were forcibly expelled mostly to North Africa, after all their possessions were confiscated and their children less than five years old were kidnapped for Christianization, and all mosques were converted to churches. Many Muslims remained in the Peninsula, keeping their religion secret and facing horrible death whenever discovered. From time to time, some managed to escape to Muslim lands.

Currently, the Kingdom of Spain has an area of 505,370 sq km, including the Balearic Islands (4,992 sq km) west of the mainland, the Canary Islands (7,493 sq km) west of Morocco and other smaller Islands off the northern coast of Morocco and exclaves in North Morocco with total area of 31 sq km including the exclaves of Ceuta (18 sq km) and Melilla (12 sq km). A map of Spain is presented in Figure 4.3.9a and that of the Canary Islands in Figure 4.3.9b, while Spanish possessions in northern Morocco are illustrated in Figure 4.3.9c.

The censuses of 1877 and 1897 showed non-Christian population of 83 and 510, respectively. In 1967, Spain allowed freedom of religions, allowing non-Christians to build their places of worship and confess their religion openly. Islam was officially recognized as a religion only in 1989. Until 1980s, the vast majority of Muslims was located in the Spanish enclaves of Ceuta and Melilla who were restricted from passing the strait to the Iberian Peninsula and only in 1986 were allowed to obtain Spanish citizenship when Spain joined the European Union. The vast majority of Muslim in Spain are Moroccans or Moroccan origin.

We estimate Muslim population based on total nationalities from Muslim majority countries. Thus, as shown in Table 4.3.9a, until 1991 Muslims constituted less than 0.2% of the total population. However, Muslims increased dramatically from 0.07 million or 0.2% in 1991, to 0.17 million or 0.4% in 1996, to 0.34 million or 0.8% in 2001, to 1.1 million or 2.4% in 2006, to 1.5 million or 3.2% in 2011, to 1.9 million or 4.1% in 2016 and 2.2 million or 4.7% in 2021. Thus, assuming that the percentage of Muslims will continue to increase by one percentage point per decade; then the Muslim population in Spain is expected to increase to 3.5 million or 8% by 2050 and 4.0 million or 13% by 2100.

The distribution of Muslims per autonomous regions based on total nationalities from Muslim majority countries. More than fourth of Muslims live in Catalonia region, and almost a third is split between Madrid and Andalusia. The largest concentration of Muslims is in the Melilla and Ceuta where they constitute around half of the population.

Historical Muslim population dataset for Spain

The figures below are from the CoMPS historical dataset. Population values are expressed in thousands; 2100 is a modelled projection, not a present-day count.

YearTotal population (thousands)Muslim population (thousands)Muslim share
190018,5940.1860.00%
200040,634337.30.83%
210030,9794,02713.00%

For the full time series and visualisation, use the interactive map above.

Explore related country guides

Browse all country guides or explore by continent.