This started a really long and complicated war that basically established the Bourbon dynasty in Spain and also awkwardly gave Gibraltar to the British.
This, combined with a shrewd series of marriage alliances, saw the territory which the Habsburgs ruled directly expand to cover most of modern-day Austria.