A fleeing Umayyad prince made Córdoba a rival caliphate
From 756 to 1031 an Umayyad state ruled most of Iberia as the Emirate, then after 929 the Caliphate, of Córdoba. Abd al-Rahman I escaped Abbasid slaughter in Syria and built a capital famed for its Great Mosque and Madinat al-Zahra.
Tariq ibn Ziyad’s 711 invasion toppled the Visigoths, and in 756 the runaway prince Abd al-Rahman I refused Baghdad’s authority, keeping a standing army of about 40,000 Berbers and saqaliba. His heirs ruled as emirs for a century and a half, nominally deferring to the Abbasids, while border marches answered only to capable local lords. Raids reached Corsica in 806, and after the 818 revolt of Córdoba’s al-Rabad suburb against Al-Hakam I the residents were expelled, some to Fez and Alexandria and others to found an emirate on Crete. The Balearics fell around 902–903.
Abd al-Rahman III took the caliphal title in 929 to answer the Fatimids, secured Melilla (927), Ceuta (931), and Tangier (951), dealt with the Franks and Byzantium, and drew annual revenue of about 6.245 million dinars. His 46-year-old son Al-Hakam II succeeded in 961 with less money to spend; his general Ghalib invaded Idrisid Morocco in 973 and brought its ruler Al-Hassan II to Córdoba in 974.
When Al-Hakam died in 976, the adviser Almanzor proclaimed his ten-year-old son Hisham II caliph, then isolated him as a figurehead. Almanzor professionalised the army, dissolved tribal units, and built it around North African Berber cavalry, playing Arabs, Berbers, and Slavs against one another; Christian mercenaries formed his personal guard. His forces entered Fes on 13 October 998.
Estimates of that army range wildly, but Évariste Lévi-Provençal put it at 35,000 to about 75,000 soldiers. Córdoba’s workshops reportedly turned out 1,000 bows and 20,000 arrows a month. Castile answered the raiding light horse in 974 by ennobling free men who kept a horse. Paying troops with loot drove constant campaigning, and in the early eleventh century civil war broke the caliphate into taifa kingdoms by 1031.
Source: Umayyad state of Córdoba