On 23 October 1086, on a plain near Badajoz in Extremadura, a Saharan army saved Muslim Iberia — and the battle of Zallaqa became the hinge on which four centuries of Moroccan-Spanish history turned.
The crisis had been building for a year. In May 1085, Alfonso VI of Castile and León took Toledo — the ancient Visigothic capital, the symbolic heart of Iberia — and the taifa kings of al-Andalus understood that, divided, they would be devoured one by one. Al-Mu'tamid of Seville, the poet-king, sent desperate embassies across the strait to Yusuf ibn Tashfin, the Almoravid emir in Marrakech. The story goes that his courtiers warned him against inviting the Saharan Berbers — "better to be a camel-driver in Africa than a swineherd in Castile," al-Mu'tamid replied. He chose the camel-driver.
Ibn Tashfin consulted his Maliki jurists, who declared the jihad lawful, and crossed to Algeciras in the summer of 1086 with perhaps 7,000 Almoravid cavalry — Lamtuna and other Sanhaja horsemen, veiled desert warriors — joined by the Andalusi levies of Seville, Granada, and Badajoz. Alfonso VI, who had been besieging Zaragoza, force-marched his army south: Castilian and Leonese knights, the heavy cavalry of Christian Iberia, confident after Toledo.
The armies met at Zallaqa — Sagrajas in the Christian chronicles — on Friday, 23 October. Alfonso attacked first, his knights smashing through the Andalusi vanguard and driving it back on the Almoravid camp. For a moment the battle hung in the balance. Then Ibn Tashfin, who had held his Saharan cavalry in reserve, committed them in a sweeping maneuver while a detachment struck the Castilian camp itself, setting it ablaze. The Christian army, caught between the returning Almoravid horse and the rallying Andalusis, disintegrated. Alfonso escaped with perhaps five hundred men of an army of tens of thousands; the field was covered with the dead.
The consequences were immense and immediate. The reconquista — which had seemed unstoppable after Toledo — stalled for a generation. Muslim Iberia, which had been a patchwork of squabbling taifas, was bound to Morocco: within four years Ibn Tashfin would annex the taifas outright, uniting al-Andalus with the Maghreb under Marrakech. The battle also announced a new fact to Christendom: the defense of Islam in the West was now a Moroccan responsibility, discharged by Moroccan armies.
Zallaqa resonates in Moroccan memory as the archetype of the country's historic role — the power that holds the strait, that answers the call from across the water, that stops empires at the gates of Iberia. From Zallaqa in 1086 to the Three Kings in 1578 to the Green March in 1975, the pattern repeats: when the decisive moment comes, Morocco acts, and history turns.
The taifa kings' dilemma at Zallaqa deserves sympathy: al-Mu'tamid of Seville knew exactly what he was inviting — in his famous reply he chose the camel-driver over the swineherd with open eyes — and the Andalusi aristocracy's subsequent resentment of Almoravid puritanism (the veiled Saharans banning wine and music in Seville) explains why Ibn Tashfin's annexation, four years later, met so little resistance and so much sullen relief. On the Christian side, the battle's trauma reshaped Castile: Alfonso VI, who had styled himself "Emperor of all Spain" after Toledo, never recovered his aura of invincibility, and the Castilian chronicles remember Zallaqa as the day God punished Christian pride. The battlefield's archaeology — the plain of Sagrajas still yields eleventh-century arms — confirms the chroniclers' scale. And the date matters: 23 October 1086 was a Friday, and Ibn Tashfin timed his general attack for the hour of the Friday prayer, when, as his jurists assured the troops, the whole Muslim world was praying for them — psychology as strategy, the Saharan commander wielding faith the way he wielded cavalry.
Impact on civilization
Part of Morocco: The Long Empire — more than eight centuries of continuous Moroccan statehood, from the Idrisids to the reigning Alaouites.
- The Cambridge History of Africa, vol. 3
- Encyclopaedia of Islam: Zallaka
- Ibn al-Athir, al-Kamil fi al-Tarikh
- Amira Bennison, The Almoravid and Almohad Empires
- Reilly, The Medieval Spains