The siege was successful and Córdoba was conquered by the Christians, who forced Yahya ibn Ghaniya, the Almoravid governor of Al-Andalus, to become a vassal of Alfonso.
[10][15] He managed to enter the city on May 24 but Ibn Ghaniya and his army were still trapped in the citadel and Alfonso had to start another siege on it.
[13] Eventually, Alfonso came to terms with Ibn Ghaniya, probably after receiving news that an Almohad army had landed in Cádiz and he did not have a garrison large enough to protect the city from an attack.
[17] During that time, Alfonso converted the mosque of Córdoba into a church, ordered a Christian cross to be placed on top of it and, accompanied by the bishop of Toledo, held a Mass on it.
[17] Although Ibn Ghaniya declared himself a vassal of Alfonso VII, he ceased to be so after a while and returned to being loyal to his dynasty, the Almoravids.