 During the French invasion of the Empordà, in the course of the crusade against Catalonia led by Philip III of France, the castle and the nearby buildings were set on fire and destroyed (1285).Remains of these original structure are in the upper part of the town.A new castle was built in the mid-13th century outside the line of the new walls.