Following the Fourth Crusade's attack on the Byzantines, the Christian Armenian Kingdom of Cilicia periodically held the port, and it was from an Armenian, Kir Fard, that the Turks took lasting control in 1221 when the Anatolian Seljuk Sultan Alaeddin Kayqubad I captured it, assigning the former ruler, whose daughter he married, to the governance of the city of Akşehir. Seljuk rule saw the golden age of the city, and it can be considered the winter capital of their empire. Building projects, including the twin citadel, city walls, arsenal, and Kızıl Kule, made it an important seaport for western Mediterranean trade, particularly with Ayyubid Egypt and the Italian city-states. Alaeddin Kayqubad I also constructed numerous gardens and pavilions outside the walls, and many of his works can still be found in the city. These were likely financed by his own treasury and by the local emirs, and constructed by the contractor Abu 'Ali al-Kattani al-Halabi. Alaeddin Kayqubad I's son, Sultan Gıyaseddin Keyhüsrev II, continued the building campaign with a new cistern in 1240.