The medieval castle (14th or 16th century) has a square shape and consists of two blocks of houses (the one surrounding the other) and a small number of houses in the center. There were 123 two-storey houses which hosted one family on the first floor and another on the ground floor. Between the two rows of houses there used to be a road, so narrow that it could only fit small carriages. There were two gates: the Lower Door to the south, in the Market street and the Top Door on the east side, next to the Folk and Maritime Museum. The gates were repaired in 1650 and 1646 because of a pirate attack in 1638, when the place was set on fire. Then the castle was reinforced with several towers. The settlement flourished after the liberation of Greece from the Turks.