Spain remains majority Catholic, around 55 to 60 percent by most estimates including Pew Research's Religious Composition of the World, 2010-2020, though religiously unaffiliated Spaniards now form a substantial minority approaching a third of the population, alongside small Muslim, Protestant and other communities. Spain's medieval history was shaped profoundly by Al-Andalus, the Muslim-ruled territory established after the 711 conquest that at its height encompassed most of the Iberian Peninsula and produced a sophisticated Islamic civilization in cities such as Cordoba, where the Mezquita, built as a mosque from 785 and converted into a cathedral after the 1236 Christian reconquest, remains among the most striking monuments of that layered religious history.
The Reconquista, the centuries-long Christian reconquest completed with Granada's fall in 1492, was followed the same year by the expulsion of Spain's Jewish population under the Alhambra Decree and, later, forced conversions and the eventual 1609 to 1614 expulsion of the Moriscos, Muslims who had nominally converted to Christianity, moves the Spanish Inquisition, established in 1478, enforced with particular severity against conversos suspected of secretly retaining their former faiths.