Cuenca’s old town has the UNESCO World Heritage designation. The city spreads out from atop a promontory overlooking the ruins of its Moorish castle, the ancient Kunka fortress. Built by the Moors in a defensive position at the heart of the Caliphate of Cordoba, Cuenca is an unusually well-preserved medieval fortified city. Conquered by the Castilians in the 12th century, it became a royal town and bishopric endowed with important buildings, such as Spain's first Gothic cathedral. Cuenca Cathedral was built from 1182 to 1270. It has a Latin cross plan with three naves and a seven-sided polygonal apse. The facade was rebuilt after it crumbled down in 1902. It has three access doors.