In 912, Ordoño II ordered the repoblación of San Esteban de Gormaz as the city had been one of the borderline cities in between the Moorish and Christian zones of the Iberian Peninsula. This region had become depopulated early in the Muslim takeover and acted as a buffer zone between the two groups.
The battle
Upon hearing of Ordoño II's efforts to repopulate and take control of the city, Abi-Abda ordered a siege of the city in 917. Ordoño II was able to successfully come to the city's aid and routed the Muslim forces. Abi-Abda himself was captured during the fray and executed by decapitation. His head was put on display on the city's ramparts as a warning to the Muslims.
Aftermath
A similar battle took place in 919 where the Muslims were repulsed; however, by 920 the city was again in Muslim hands. The city changed hands several times until 1054 when the town was permanently retaken by the Christian forces under the command of Rodrigo Diaz de Vivar, also known as el Cid.