Treaty of the Pyrenees
The town was captured and recaptured several times by the French and Spanish between 1639 and 1658. It was finally annexed to France in the Treaty of the Pyrenees of 1659.