Following the negotiation of the Treaty of the Pyrenees in 1659, the Fort de Bellegarde in Le Perthus passed from Spain into the hands of the French state.
That bastion had been the border defense for Spain, so to replace it and stop possible future invasions, it was decided to build a fortress on the hill in Figueres.
The hero of the siege, the gravely-ill military governor Mariano Álvarez de Castro, was captured and imprisoned in Perpignan, France.
In December 1823 French troops passed through Figueres again, intervening in Spain to restore the Bourbon throne of Ferdinand VII.
[3] The castle occupies an area of 320,000 m2 within a perimeter of 3120 m, and cisterns located under the courtyard are able to hold up to 10 million liters of water.