[[caption-width-right:308:The Cathedral-Mosque of Cordoba, neatly summing up the matter.]]
'''Moorish Spain''', also known by its Arabic name '''Al-Andalus''', is a medieval civilisation spanning much of the Iberian peninsula and lasting up to eight centuries. It is often thought to be a great culture, bringing great peace and prosperity within their domain and most importantly being an oft-cited example of a culture where adherents of all three Abrahamic religions coexist in relative harmony. The civil accomplishments of the civilisation is believed by some as [[UrExample the first]] [[UsefulNotes/TheRenaissance Renaissance]] in continental Europe, and in spite of its later downfall, its advances left lasting marks on the Spain we know today.

!!More Than a Little Help: Muslim Conquest of Visigothic Hispania
After the fall of the [[UsefulNotes/TheRomanEmpire Western Roman Empire]], the Germanic Visigoths quickly took to the former Roman domain of Hispania. Their rule, however, was plagued by infighting between rival factions, weakening their grip on power throughout the centuries. In contrast, by the beginning of the 8th century, Muslim powers to the east were spreading their reach. The Ummayad Caliphate, a Sunni empire based in Damascus, loomed over the Mediterranean, conquering North Africa and [[YouWillBeAssimilated converting its inhabitants]][[note]]Accidentally; Scripture was interpreted to mean that non-Muslim monotheists would be permitted to retain their religion as long as they paid higher taxes. At first this was OK, because the taxes were still lower than before, but over time the Caliph and nobles started living luxuriously, taxes went up, and people started converting to Islam for the tax cut. This dismayed the Caliph and caused the end of the Umayyad dynasty; all this is relevant to the story of Spain because both Spaniards and Berbers were Christian before Islam came along, and thus were subject to the policy of toleration.[[/note]] along the way. In 711, supporters of the assassinated Visigothic king Wittiza were impressed by the rising power and [[ViolationOfCommonSense asked for the Ummayad’s help]] against the pretender Roderic. The Caliphate went on to launch a small expedition into the peninsula, mostly consisting of Berbers and led by Moroccan Arabized-Berber commander Tariq ibn Ziyad.[[note]]Full name: Tariq ibn Ziyad ibn Abdullah ibn Walghu. Walghu is ''not'' an Arab name. The others are.[[/note]] [[note]]It is believed that Gibraltar’s name originated from “Gebal al-Tariq”, or “Rock of Tariq”.[[/note]]

Seeing the Visigoths weakened and crumbling, the Muslims saw the opportunity to make good upon their words, [[BeCarefulWhatYouWishFor along with quite a bit more]]. With the rulers offering insignificant resistance and the populace effectively welcoming them with open arms, the Muslims rapidly subjugated Hispania’s south in a series of raids. Roderic’s death in battle in 712 further weakened the kingdom, and the strongholds of Cordoba, Seville and Toledo fell with ease. Three years after their arrival, the Muslims had their grip upon former centres of Roman rule and turned surrounding regions into obedient client states. A small proportion of Hispania’s Christian population fled northward, waging border warfare for the next two centuries.

!!Al-Andalus, the Emirate, the Caliphate and the ShiningCity
After the Visigoth’s downfall, the Muslims centred their new domain in Cordoba. The first government of Al-Andalus was Abd al-Aziz ibn Musa, who took Roderic’s widow and was assassinated by rivals not long after his rise to power. His successor [[HighTurnoverRate largely failed to fare better]] in the midst of diverse Muslim groups, [[RagtagBunchOfMisfits many of them having only turned to Islam few decades earlier]] and understandably less than happy at the prospect of serving an Arab empire. The ethnic tensions between the ruling Arabs and the oppressed Berbers had previously placed the latter at the vanguard of the Muslim expansion with lesser shares of the spoil, and the Berber revolts of 740 - 743 compelled a garrison in Galicia to abandon their post to attempt a takeover against the numerically inferior Arabs, allowing the Kingdom of Asturias to claim the region for good. Things took a different turn in 756, when the Abbasids overthrew the Umayyads and took Damascus. The exiled Umayyad prince Abd al-Rahman ibn Muawiyah took over Al-Andalus and declared an Emirate of Cordoba. By a number of accounts, Abd al-Rahman acted as somewhat of a strongman figure, crushing internal oppositions as well as annihilating an Abbasid invasion of Portugal, for once bringing the Muslims together.

Spain is generally agreed to have prospered throughout the Emirate period. Muslim scholars helped introduce artefacts of [[AncientGreece Greek philosophy]] to [[TheMiddleAges Western Europe]] and helped agriculture through Persian and Nabataean agricultural techniques and land reform. This, along with inventions such as [[ClockPunk new industrial mills and dams]], drove Mediterranean fruits, rice, olive and grains to flourish. The urban area in particular enjoyed a lavish amount of [[TechnologyPorn technological development]], skilled labour and education, fuelling an unprecedented economic growth. In 929, Abd al-Rahman’s successor Abd al-Rahman III declared a Caliphate of Cordoba, marking the civilisation’s cultural summit.

Worthy of note is Cordoba’s status as the centre of Muslim Spain. Cordoba was effectively ''the'' ShiningCity of TheMiddleAges, and thanks to the aforementioned advances, one of the world’s foremost centres of civilisation in the 10th century. It was too remarkable among its contemporaries for its sophisticated [[BoringButPractical plumbing system]]. One author wrote of Cordoba:

-->''”There were half a million inhabitants, living in 113,000 houses. There were 700 mosques and 300 public baths spread throughout the city and its twenty-one suburbs. The streets were paved and lit ... there were bookshops and more than seventy libraries”''

Impacts of the Muslim rule can be seen today within the local architecture, ethnography and in particular the massive Cordoba Mosque (''Mezquita''). Scottish scholar Michael Scot would later bring the teachings of Ibn Rushd (“[[MyNaymeIs Averroes]]”) and Ibn Sina (“[[AccidentalMisnaming Avicenna]]”) to Italy, helping spark the European Renaissance.

!!I Am, You Are, We Are Andalusians: Cultural Relations in Muslim Spain
The legacies of the Muslim rule are undeniably expansive, to some degree [[SceneryPorn altering Spanish architecture]] in particular, resulting in well-known architectural marvels such as the aforementioned Cordoba Mosque, the Giralda of Seville, and the Alhambra of Granada. The occupiers were at first entirely male and intercultural marriages were quick to occur. But particularly noteworthy is the relationship between the occupying Muslims, the Christians and the Jews. While the [[LighterAndSofter romanticisation]] of the period has sparked some debate between historians, Al-Andalus is generally agreed to be a much better place to live in as a religious minority than most of its contemporary civilisations. There were certainly rules and regulations that have no place in a modern democracy: for instance, non-Muslim men could not marry Muslim women while the opposite was true, preaching other religions to Muslims was strictly forbidden and capable non-Muslim men were to pay an annual ''jizya'' tax, along with increases on other taxes. All of this is in accordance with then-contemporary understanding of Muslim scripture, which also accorded non-Muslim citizens were the status of ''ahl al-dhimma'' (those to be protected), and generally enjoyed far more freedom than minorities did elsewhere; the flipside of the "higher taxes" bit was that non-Muslims were forbidden from joining the army (but ''not'' from owning weapons; indeed, Jews were frequently employed as police), which seems (and seemed) to be a pretty good deal. Some of the remnants of the civilisation still lasting today are actually churches and synagogues! With the aforementioned limitation, intermarriages did happen, businesses were conducted between adherents of all three religions, and representatives of all cultures took posts in all but the highest hierarchies of the government. Being effectively second-class citizens, non-Muslims often had to work rough jobs such as butchers and tanners, yet a substantial number also dealt in the tertiary sector quite successfully; according to some accounts, Andalusian Jews were among the most prosperous within the Diaspora.

It should also be noted that partly due to the ''jizya'' system, native Christians converted to Islam in large scales, with up to 80% of Spain being Muslim in 1100. Native converts were termed ''muwalladun'', and a good number of faithful Christians came to adopt Arabic and Islamic ways and customs, earning the term ''Mozarabs'' (from the Arabic ''Musta`rab'', "one who has become Arab").

The reasons for the relatively enviable rights of minorities has attracted a substantial amount of speculation. It is generally agreed upon that with the Muslims' initial numerical inferiority, an attempt to forcefully convert or otherwise oppress the populace would have been [[VillainBall grossly impractical]]. Some historians have also suggested previous internal conflicts within the Muslim ranks as a cause, which is likely to have caused Abd al-Rahman to set up the non-Muslims as political counterweights against his Muslim adversaries.

!!Nobody Expected the Spanish Christianisation: Downfall of the Cordoba Caliphate
Like all good things, of course, [[StartOfDarkness the amiable state had to come to an end]]. As the Caliphate [[IronicEcho grew rife with infighting]], its grip on power eventually slipped away, and it effectively collapsed between 1009 and 1013. Its former domain was split between numerous independent states called ''ta’ifas'', largely little more than mere shadows of the empire growing more and more vulnerable to [[TheAlliance the Catholic kingdoms to the north]]. The apparent pressure on Islamic rule brought religious minorities to suffer worsening treatment: religious paraphernalia were banned in public, and those perceived as being opposed to Islamic rule were to suffer harshly. Perhaps the most well-known incident of the era is the Granada pogrom, a 1066 incident in which [[KickTheDog Granada Jews were killed en masse]]. This, of course, did little to oppose the Catholics, who launched a ''[[OccupiersOutOfOurCountry Reconquista]]'' (reconquest) campaign and took Toledo in 1085.

In 1086, the Iberian ta’ifas requested help from Yusuf ibn Tashfin, the king of the Moroccan Almoravids. His forces managed to decisively defeat those of Alfonso VI of Leon and Castile in the Battle of Sagrajas. Harbouring contempt for the incompetence of ta’ifa princes and enjoying the support of their oppressed populace, Yusuf went on to annex most of the ta’ifas and put a stop to the Christian reconquest.

After decades of Almoravid rule, Muslim Spain was again invaded in 1119 and 1121, with the Aragonese enjoying French support this time. After a series of defeats, Lisbon returned to Christian rule (more specifically, the rising Kingdom of UsefulNotes/{{Portugal}} which had declared independence a few years earlier) in 1147, and through centuries of fighting, the rest of the land followed as well. The last Western European Muslim power to fall was Granada, which surrendered in 1492, thereby ending Muslim rule of Spain for good.
!!Moorish Spain in fiction

* ''Film/ElCid''
* ''The Long Ships'' (1964) (''very'' [[SuggestedBy loosely based]] on ''Red Orm'' by Frans G. Bengtsson, see below) featured Richard Widmark as a viking adventuring in Spain and Creator/SidneyPoitier as a Moorish emir.
* Washington Irving's ''Tales of the Alhambra.''
* ''Film/AssassinsCreed2016'': Cal Lynch revisits the life of his ancestor, the Assassin Aguilar de Nerha, at the time of the fall of Granada in 1492 through the use of the Animus.

* The first book of ''Literature/TheLongShips'' a.k.a. ''Red Orm'' by Frans G. Bengtsson is mostly set in Moorish Spain. Orm and his comrades are captured on a viking trip to Iberia and end up as bodyguards to Al-Mansur, the ''de facto'' ruler of the Caliphate.
* Creator/GuyGavrielKay's ''Literature/TheLionsOfAlRassan'' is set in a HistoricalFantasy version of Reconquista-era Iberia, with the titular Al-Rassan corresponding to Al-Andalus.
* In ''Literature/ASongOfIceAndFire'' the principality of Dorne is a dead-ringer for Moorish Spain.

* ''Videogame/CrusaderKings'' is set right in the middle of the ''Reconquista''. Both Muslim and Christian rulers are playable.
** ''VideoGame/EuropaUniversalis'', following on from ''Crusader Kings'', starts off close to the end of the ''Reconquista'' (''how'' close depends on the game and expansion). Usually Granada gets conquered when Castile gets around to it, but a skilful player can turn things around for the Moors.
* In ''VideoGame/AgeOfEmpiresII'', it was the setting of the El Cid campaign. In ''African Kingdoms'' the Berbers were introduced, and you get to play as Tariq ibn Ziyad.