The construction of the medieval town walls in Hvar began after 1278, when Hvar came under Venetian rule. The walls surrounded the medieval town, which today forms the Groda district. The walls were completed in their current form in the mid-15th century. Although they were a strong defensive barrier at the time, with the development of firearms in the 16th century they lost their defensive function. The walls are topped with a battlement with crenellations and loopholes, and there are four towers on the walls – three on the eastern side and one on the western side. The Hvar town walls have four gates.