The first "intendencias" were established in Spain after 1711, during the War of the Spanish Succession on the advice of Jean Orry, who had been sent by Louis XIV of France to help his young grandson Philip V set up his new government.