Complex sentence: The town was captured and recaptured several times by the French and Spanish between 1639 and 1658, and finally annexed to France in the Treaty of the Pyrenees of 1659.
Split into simpler sentences: 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.