 Their purpose was as a refuge for the people and a last line of defense for the town.Forts were prepared to withstand long sieges 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 centres of governance, educational establishments or community facilities.