 On September 21, 1177, Alfonso VIII of Castile, "The Noble", defeated the Moors after a nine-month siege and conquered the city of Cuenca.The city was made a diocese in 1183, and work began to build the cathedral on the foundations of the main Muslim mosque.Like several other cathedrals built in Castile in the same period, Cuenca Cathedral is said to have been inspired by Eleanor Plantagenet of England, wife of King Alfonso VIII and daughter of Henry II of England and Eleanor of Aquitaine.