In times of war and with high and thick walls, their purpose was as a refuge for the people and a last line of defense for the town. Forts were prepared to withstand long siege with water wells, food storing capacity and secret tunnels ending many kilometers away from the walls of the fort. In times of peace they served as a center of governance, a place for education and a social interaction point.