The remains of the castle have undergone various extensions and renovations over time. The construction of the original site dates back to the 10th century. In the same way, the first documentary mention is found in 1078, when it is mentioned that the diplomatic archive of the county of Empúries was installed in the castle. Between the s. XI and XV the castle was reformed and expanded and, between the s. XIII and XIV, was involved in various wars, which led to that during the s. In the 15th century, the largest extension and remodeling works were carried out: the main tower, the central hall and the great hall on the north side were built. In this way, the appearance and plan of the old fortress practically disappeared. In the 17th century, the fortification was abandoned and occupied occasionally during the French War and the Civil War.

