in 1659, louis xiv and the philip iv of spain signed the treaty of the pyrenees. the french king also married the infanta marie therese. the treaty changed the borders. it gave rousillon to france and moved the frontier south to the crest of the pyrenees, where it is now. the fortresses therefore lost their importance. some maintained a garrison for a while, a few until the french revolution, but they slowly fell into decay, often becoming sherpherds' shelters or bandits hideouts.