immense pressures of the Thirty Years' War, Olivares attempted to bureaucratically centralise administration and to extract further taxes via the Union of Arms: Catalonia revolted and was virtually annexed by France. Portugal reasserted its independence in 1640, with the Restoration War sparked by a Braganza claimant to the Spanish throne; and an attempt was made to separate Andalusia from Spain. Spanish forces recovered Naples and most of Catalonia from French control but Portugal was lost permanently. In 1648, at the Peace of Westphalia, Spain assented to the emperor's accommodation with the German Protestants, and in 1654 it recognized the independence of the northern Netherlands.