This is the citadel, with a Byzantine chapel that never was touched by a series of Islamic conquerors. Alaeddin Kaykobad I took the city– after a fruitless siege – in 1221 without bloodshed from the Armenian Kir Farid. He named it Ala-Iya and turned it into his second winter residence. He’s the one that built the walls.