When Ferdinand died, Sancho continued to enlarge his territory, conquering both Christian strongholds and the Moorish cities of Zamora and Badajoz.
In the Battle of Cabra (1079), El Cid rallied his troops and turned the battle into a rout of Emir Abdullah of Granada and his ally García Ordóñez.