Alanya is a touristic center on Turkey's Mediterranean coast 135 kilometers east of Alanya. Excavations have shown that the Alanya area was inhabited as early as prehistoric times. Antalya first appears in the 2nd century B.C. as a pirate lair and it was known then as Korakesion. The Romans later captured the town in their campaign to suppress piracy in the eastern Mediterranean. It came under Byzantine rule after 395. In 1220 the Seljuk sultan Alaeddin Keykubad I took the city and had the great castle and dockyards built. Known then as Alaiye, a name derived from that of the sultan, the city was used by the Seljuks as their naval base in the Mediterranean and it remained an important military post in Ottoman times. A century later the Arab traveler Ibn Battuta visited Alanya and described it thus:The city of Alaiye is a large town on the seacoast. It is inhabited by Turtkomans and is visited by the merchants of Cairo, Alexandria, and Syria. The district is f well-wooded and wood is exported from there to Alexandria and Damietta, whence it is carried to the other cities of Egypt. There is a magnificent and formidable citadel, built by Sultan Alaeddin at the upper end of the town. The "magnificent and formidable citadel" was built by Alaeddin Keykubad I in 1226 on the site of an earlier fortress. (Strabo refers to one being here in Roman times.) It consists of three sections: an inner keep, the central castle, and an external redoubt. The inner keep contains cisterns, the ruins of a Seljuk palace, a fresco-decorated courtyard, military fortifications, and a Byzantine chapel in the middle. At the northwestern corner is a place where prisoners condemned to death were hurled over the precipice by means of catapults. The central castle contains a masjid built in 1230 by Aksebe Sultan as well as her tomb. Suleymaniye Mosque was originally constructed in 1231 but was rebuilt during the reign of Suleyman the Magnificent when an Ottoman arasta (row of shops) was added. There is also a 17th century Ottoman khan. Located on the outer walls of the castle is Kizil Kule (Red Tower), so called because of the red bricks used in its construction. This octagonal structure was built in 1227 and stands in all its magnificence even today. (It is particularly impressive when illuminated at night.) Adjacent to the tower are the dockyards where five vessels could be worked on at a time. Next to the dockyards is a tower called Tophane Kule (Arsenal Tower) where cannons were cast during Ottoman times. Nearby close to the seashore is a cave called Damlatas. The humid air inside this cave is supposed to be good for those suffering from asthmatic problems. Alanya's archaeological museum contains numerous interesting works and is well worth a visit. Owing to its vital importance as a naval base, Alanya was connected by roads that went east and west and into the hinterland. (The Seljuk capital was up country in Konya.) To ensure the comfort and safety of travelers the Seljuks built numerous caravanserais along these roads. One of them, Sarapsahan, can be seen on the road to Antalya and was built in 1246. Another is Alarahan located nine kilometers off the highway. Next to it is a citadel called Alara that the Seljuks restored and used. On the road to Gazipasa are the remains of ancient lotape.