Prologue: The Umayyad Invasion and the Caliphate of Córdoba
Tariq ibin Ziyad, the leader of the Umayyad invasion of al-Andalus.
In 711 the Great Umayyad Caliph Al-Walid I ordered the illustrious Tariq ibn Ziyad to invade al-Andalus through modern day Gibraltar (Gibraltar is directly related to Gibr Tariq, meaning rock of Tariq). Upon landing in al-Andalus Tariq ordered his ships burned. The 17th century historian Al-Maqqari attributes the following statement to Tariq:
Whether spurred on by Tariq's words or the fact the they had no escape, the Umayyad armies swept through al-Andalus. Perhaps the biggest factor in Tariq's success was just simple good timing. When Tariq landed in the south, King Roderic was busy putting down a Basque revolt in the north. Roderic was forced to quickly deal with the revolters and turn to the south. He forced his men into a fast march and sent riders out to round up the local militias to slow the rapid Muslim advance. Instead of slowing them, the reverse happened; the Muslim forced advanced faster, until, on 19 July 711, the Visigoths engaged Tariq's forces in a battle near Shedunya.
The Battle of Shedunya, also called the Battle of Guadalete.
The battle was disastrous for the Visigoths. King Roderic didn't have full support of his generals and, during a crucial infantry charge, Sisibert with held his infantry leaving the right flank opened. Tariq poured his cavalry and infantry into the opening, pinning the Visigoths, their only escape route available was to swim across the Guadalete. With no hope of escape the Visigoth forces fought bravely, but ultimately futilely. King Roderic was killed in the engagement and the Visigoths were broken; within seven years Tariq brought most of al-Andalus under Muslim control. Tariq would continue his campaign into the Kingdom of the Franks where he and his successor would find mixed success.
Thirty-eight years later, the exiled Umayyad prince Abd ar-Rahman I, arrived in al-Andalus and ousted Yusuf al-Fihri for control over the region. Rahman proclaimed himself the Emir of Córdoba and independent of the newly established Abbasid empire. For several years the descendants of ar-Rahman continued to consolidate their power in al-Andalus, until, in 912, Abd-al-Rahman III was crowned Emir of Córdoba. Hoping to heighten his prestige in the eyes of his peers and put him on par with the caliphs in Baghdad and Tunis, in 926 Rahman III proclaimed himself the Caliph of Córdoba. The first golden age of al-Andalus had begun. Under the new Caliphate, Córdoba eventually surpassed Constantinople in population and such notable scientist and philosophers as Abu al-Qasim al-Zahrawi and Ibn Rushd lived and worked in Córdoba. But it could not last.
Al-Andalus c. 1000.
In 976 Caliph al-Hakam died. The Caliphate passed on to his ten year old son, who was crowned Hisham II. Realizing that Hisham II was in no way ready to be Caliph yet, Al-Mansur Ibn Abi Aamir (the top adviser to Hisham's father), locked Hisham II away and effectively ran the Caliphate, even when Hisham II reached his majority. Where as Rahman III had ruled justly and shied away from matters of religion, Al-Mansur had no problem using force to keep the Christians in al-Andalus in check. He also eliminated much of the established, Arabic, noble-class and instead replaced them with Berbers. When Al-Mansur died in 1002 his son Abd al-Malik took his place; he even forced Hisham II to proclaim him the next in line for the succession. He would not be long for this world, in 1008 al-Malik died and was replaced by his brother Abd al-Rahman, whom also forced Hisham II to proclaim him his chosen successor. He too was not in his position for long; in 1009 while leading a raid in Christian lands, the city of Córdoba rose against him. They placed Hisham II's cousin Muhammad al-Mahdi on the throne and when Abd al-Rahman attempted to retake the city his troops deserted him and he was arrested and later killed by the order of Caliph Muhammad II.
Unfortunately, not everyone was happy with the new Caliph. Revolts wracked the Caliphate. Muhammad II had only ruled as Caliph for a few days, as he was deposed by Sulayman II ibn al-Hakam on 1 November 1009. Sulayman II was in turn deposed by Muhammad II a few months later, and Muhammad II was assassinated and replaced by Hisham II. Hisham II only had a few years left to live, and in 1013 Sulayman II besieged and later reconquered Córdoba, killing Hisham II once and for all. Three years later, in 1016, the Hammadids attacked and conquered Córdoba.
What followed can only be described as fourteen years of civil war. Besides fighting the Hammadids, the Ummayads also fought amongst themselves for control of the Caliphate. All this left the Caliphate extremely unstable and, in 1031, it finally collapsed into several independent taifas ruled by emirs.
Al-Andalus after the fall of the Córdoba Caliphate in 1031.
These new taifas competed against each other not only in matters of the military, but also cultural. The emirs in each of the taifas actively recruited poets and artists, usually at the cost of their armies. What this meant was, that by 1066, the remaining taifas were extremely advanced in not only the liberal arts, but also the various sciences, while they were somewhat lacking in military matters. This would come back to haunt them, as they raced to catch-up to the Catholic kingdoms of the north.
Al-Andalus in 1066.
Tariq ibin Ziyad, the leader of the Umayyad invasion of al-Andalus.
In 711 the Great Umayyad Caliph Al-Walid I ordered the illustrious Tariq ibn Ziyad to invade al-Andalus through modern day Gibraltar (Gibraltar is directly related to Gibr Tariq, meaning rock of Tariq). Upon landing in al-Andalus Tariq ordered his ships burned. The 17th century historian Al-Maqqari attributes the following statement to Tariq:
"Oh my warriors, whither would you flee? Behind you is the sea, before you, the enemy. You have left now only the hope of your courage and your constancy. "
Whether spurred on by Tariq's words or the fact the they had no escape, the Umayyad armies swept through al-Andalus. Perhaps the biggest factor in Tariq's success was just simple good timing. When Tariq landed in the south, King Roderic was busy putting down a Basque revolt in the north. Roderic was forced to quickly deal with the revolters and turn to the south. He forced his men into a fast march and sent riders out to round up the local militias to slow the rapid Muslim advance. Instead of slowing them, the reverse happened; the Muslim forced advanced faster, until, on 19 July 711, the Visigoths engaged Tariq's forces in a battle near Shedunya.

The Battle of Shedunya, also called the Battle of Guadalete.
The battle was disastrous for the Visigoths. King Roderic didn't have full support of his generals and, during a crucial infantry charge, Sisibert with held his infantry leaving the right flank opened. Tariq poured his cavalry and infantry into the opening, pinning the Visigoths, their only escape route available was to swim across the Guadalete. With no hope of escape the Visigoth forces fought bravely, but ultimately futilely. King Roderic was killed in the engagement and the Visigoths were broken; within seven years Tariq brought most of al-Andalus under Muslim control. Tariq would continue his campaign into the Kingdom of the Franks where he and his successor would find mixed success.
Thirty-eight years later, the exiled Umayyad prince Abd ar-Rahman I, arrived in al-Andalus and ousted Yusuf al-Fihri for control over the region. Rahman proclaimed himself the Emir of Córdoba and independent of the newly established Abbasid empire. For several years the descendants of ar-Rahman continued to consolidate their power in al-Andalus, until, in 912, Abd-al-Rahman III was crowned Emir of Córdoba. Hoping to heighten his prestige in the eyes of his peers and put him on par with the caliphs in Baghdad and Tunis, in 926 Rahman III proclaimed himself the Caliph of Córdoba. The first golden age of al-Andalus had begun. Under the new Caliphate, Córdoba eventually surpassed Constantinople in population and such notable scientist and philosophers as Abu al-Qasim al-Zahrawi and Ibn Rushd lived and worked in Córdoba. But it could not last.

Al-Andalus c. 1000.
In 976 Caliph al-Hakam died. The Caliphate passed on to his ten year old son, who was crowned Hisham II. Realizing that Hisham II was in no way ready to be Caliph yet, Al-Mansur Ibn Abi Aamir (the top adviser to Hisham's father), locked Hisham II away and effectively ran the Caliphate, even when Hisham II reached his majority. Where as Rahman III had ruled justly and shied away from matters of religion, Al-Mansur had no problem using force to keep the Christians in al-Andalus in check. He also eliminated much of the established, Arabic, noble-class and instead replaced them with Berbers. When Al-Mansur died in 1002 his son Abd al-Malik took his place; he even forced Hisham II to proclaim him the next in line for the succession. He would not be long for this world, in 1008 al-Malik died and was replaced by his brother Abd al-Rahman, whom also forced Hisham II to proclaim him his chosen successor. He too was not in his position for long; in 1009 while leading a raid in Christian lands, the city of Córdoba rose against him. They placed Hisham II's cousin Muhammad al-Mahdi on the throne and when Abd al-Rahman attempted to retake the city his troops deserted him and he was arrested and later killed by the order of Caliph Muhammad II.
Unfortunately, not everyone was happy with the new Caliph. Revolts wracked the Caliphate. Muhammad II had only ruled as Caliph for a few days, as he was deposed by Sulayman II ibn al-Hakam on 1 November 1009. Sulayman II was in turn deposed by Muhammad II a few months later, and Muhammad II was assassinated and replaced by Hisham II. Hisham II only had a few years left to live, and in 1013 Sulayman II besieged and later reconquered Córdoba, killing Hisham II once and for all. Three years later, in 1016, the Hammadids attacked and conquered Córdoba.
What followed can only be described as fourteen years of civil war. Besides fighting the Hammadids, the Ummayads also fought amongst themselves for control of the Caliphate. All this left the Caliphate extremely unstable and, in 1031, it finally collapsed into several independent taifas ruled by emirs.

Al-Andalus after the fall of the Córdoba Caliphate in 1031.
These new taifas competed against each other not only in matters of the military, but also cultural. The emirs in each of the taifas actively recruited poets and artists, usually at the cost of their armies. What this meant was, that by 1066, the remaining taifas were extremely advanced in not only the liberal arts, but also the various sciences, while they were somewhat lacking in military matters. This would come back to haunt them, as they raced to catch-up to the Catholic kingdoms of the north.

Al-Andalus in 1066.