Treaty of Aix-la-Chapelle
Franche-Comté was captured by France in 1668, but returned to Spain under the Treaty of Aix-la-Chapelle. It was conquered a second time in 1674, and finally was ceded to France in the Treaty of Nijmegen (1678). Enclaves such as Montbéliard remained outside French control.