During antiquity the city passed between the control of neighbouring Cilicia and Pamphylia, and during the 7th and 8th centuries AD, successive wars and economic stagnation caused the city to shrink.
The Seljuk Period brought the history of Alanya to its zenith. In 1221, the Seljuk Sultan Alaaddin Keykubat made Alanya his winter residence and rebuilt the city, and Alanya became the main base of the Seljuk navy.
In this period defensive walls were also renovated and Kızılkule (Red Tower) and Tersane (Dockyard) were constructed.