The settlements on the hill and those near the coast had a separate history in certain periods, as it was the case during the 14th century, when the hill castle was captured by the Aydinids, and the port city, with another castle, was held by the Genoese until its capture by Tamerlane in 1403.