In 1708, as a consequence of the Spanish War of Succession, the rule of the Kingdom of Sardinia passed from King Philip V of Spain into the hands of the Austrians, who occupied the island. The Treaty of Utrecht granted Sardinia to the Austrians, but in 1717, Cardinal Giulio Alberoni, minister of Philip V of Spain, reoccupied Sardinia.