Alfonso VI abandons the siege of Zaragoza, recalls his troops from Valencia and appeals to Sancho I of Aragon for help.
Finally he sets out to confront the enemy northeast of Badajoz, where the two armies meet on October 23, 1086 at the Battle of the Sagrajas.
Alfonso reaches the battleground with some twenty-five hundred men, including fifteen hundred cavalry, in which seven hundred and fifty are knights, but finds himself outnumbered, reportedly three to one.
The two leaders exchange messages before the battle.
Yusuf is reputed to have offered three choices to the Castilians: convert to Islam, to pay tribute (jizyah), or battle.
French nobles arrive with reinforcements, but are too late to save the Castilian-Aragonese forces from a crushing defeat.
Many Jews reportedly fought together with Alfonso against the Almoravids.
The Moslem armies also had a large number of Jews serving in them, so much so that the battle had been arranged not to fall on the Sabbath.
While the numbers may be exaggerated, they reflect the fact that Jews actually took part in most of the Spanish wars of the period.
At least half the Castilian army is lost.
One lone source claims that only five hundred knights returned to Castile, although others do not support this low figure, so it seems that most of the nobility survived.
The dead include counts Rodrigo Muñoz and Vela Oveguez.
King Alfonso VI sustains an injury to one leg that will cause him to limp for the rest of his life.
Casualties are also heavy on the Almoravid side, especially for the hosts led by Dawud ibn Aysa, whose camp had been sacked in the first hours of battle, and by the emir of Badajoz, al-Mutawakkil ibn al-Aftas.
The Sevillan emir al-Mu'tamid had been wounded in the first clash but his personal example of valor had rallied the al-Andalus forces in the difficult moments of the initial Castilian charge led by Alvar Fañez.
Those killed include a very popular imam from Cordoba, Abu-l-Abbas Ahmad ibn Rumayla.
The battle is a decisive victory for the Almoravids but their losses mean that it is not possible to follow it up.
Yusuf has to return prematurely to Africa due to the death of his heir.
Castile suffers almost no loss of territory and is able to retain the newly occupied and psychologically important city of Toledo.
However, the Christian advance will be halted for several generations while both sides regroup.