Although outside the strict area of the mountain
range, Hostalric is evidence of another medieval phenomenon
related to castles: walled towns. The walls were a defence
mechanism against invaders, and also against undesirables:
the doors of the town were shut during the night to impede
the entrance of outlaws; those who did not reach the city
in time had to spend the night out in the open.