It is first mentioned in 724, making it one of the few known Anatolian localities to be established during the early Middle Ages which hence, according to researcher Clive Foss, "should reveal the appearance of a distinctively Byzantine site". It is best known as a place of exile, as well as an important fortress and naval base of the Cibyrrhaeot Theme As such it was twice attacked by the Arabs, in 924 and 1035. The existence of a monastery on the site is also attested in the 11th century. The fortress was sacked by the Seljuk Turks around 1080, but it was recovered and refortified under the Komnenian emperors. It remained in Byzantine hands until 1269, when it was captured by the Turkish emirate of Menteshe.