Alanya was located on a little peninsula, the north surrounded by the Toros Mountains and the south by the Mediterranean Sea. Due to its location between Pamphylia and Cilicia the city was called both Pamphylia and Cilicia in the ancient ages.
There is no definite information about the first resettlement of Alanya. In 1957 Professor Doctor Kilinc KÖKTEN during the researches made 12 km away from the centre of the city near the cave Kadiini found remains that prove the fact that Alanya’s history can be traced back to the Upper Palaeolithic Era (BC 20.000 – 17.000).
There is no sufficient information about when was and by whom was founded Alanya. The oldest known name of the city is Korakesium. Later on the Byzantium era, its name formed into Kalanoros. In the 13th century the Anatolian Seljuk Sultan Alaeddin Keykubad I (1200-1237) took over the control of the city giving it the name Alaya. Ataturk named the city as Alanya when he visited it in 1935. For the first time Korakesium was mentioned in his writings by the ancient geographer Skilak back in the 4th century of BC. At that time, a significant part of the current Anatolia was in the hands of the Persians. In later times, the city was visited by such historians, geographers and travellers as Strabo, Piri Reis, Seyep, Ibn Battuta, Evliya Çelebi and all of them were colourfully describing the city in their books.
Today we haven’t enough reliable information about the early history of the Byzantine period and the region. It is known that in the 7th century of AD the town was forced to defend itself from the raids of the Arabs and for this reason the paramount importance was given to strengthening of the castle. That is why many castles and churches in Alanya and the surrounding areas are dating back to 6th and 7th centuries of AD.
The Anatolian Seljuk Sultan Alaeddin Keykubad I conquered the castle defeating the Christian ruler of Alanya Warta Cyrus in 1221. Following this, the Sultan built a palace for himself. Seljuks used Alanya as a second, after Konya, capital and as a winter residence and was developed a lot.
The Mughal invasions in 1243 and the Egyptian Mamluks in 1277 seriously undermined the power of the Seljuks. In 1300, the Seljuk State collapsed. The region was sold to one of the Mamluk Sultans from the Karamanoguls dynasty for five thousand Altıns. Subsequently, in 1471, during the reign of the Sultan Fatih Mehmet the city became part of the Ottoman Empire.
Alanya, together with Tarsus joined the state of Cyprus in 1571, while in 1864, it become the sanjak (county) of the province of Konya. The city joined Antalya in 1868, and in 1871 it became a county of the province.