After an unsuccessful Cuenca sortie against the Christian camp on 27 July, the besieged city was conquered by Alfonso's troops on 21 September 1177, while the Muslim garrison took refuge in the citadel.