Most of the castle was built in the 13th century under the Seljuq Sultanate of Rûm following the city's conquest in 1220 by Alaeddin Keykubad I, as part of a building campaign that included the Kızıl Kule. The castle was built on the remnants of earlier Byzantine era and Roman era fortifications. After the area was pacified under the Ottoman Empire, the castle ceased to be purely defensive, and numerous villas were built inside the walls during the 19th century. Today the building is an open-air museum. Access to the seaward castle is ticketed, but much of the area inside the wall, including the landward castle is open to the general public.